Skip to content

Commit 227d19a

Browse files
committed
Add missing free call
The summary pointer is not being freed after returning from the default case in the switch statement. Added a call to free the summary pointer before returning.
1 parent 620b4ff commit 227d19a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/fw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,7 @@ switchtec_fw_part_summary(struct switchtec_dev *dev)
16011601
break;
16021602
default:
16031603
errno = EINVAL;
1604+
free(summary);
16041605
return NULL;
16051606
}
16061607

0 commit comments

Comments
 (0)