Skip to content

Commit e97c14f

Browse files
Merge pull request #441 from lvklevankhanh/fix_memory_leak
Fix memory leak
2 parents 0642a21 + b6149e2 commit e97c14f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/console/dlt-control-common.c

+2
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ void set_ecuid(char *ecuid)
124124
if (dlt_parse_config_param("ECUId", &ecuid_conf) == 0) {
125125
memset(local_ecuid, 0, DLT_CTRL_ECUID_LEN);
126126
strncpy(local_ecuid, ecuid_conf, DLT_CTRL_ECUID_LEN);
127+
if (ecuid_conf !=NULL)
128+
free(ecuid_conf);
127129
local_ecuid[DLT_CTRL_ECUID_LEN - 1] = '\0';
128130
}
129131
else {

0 commit comments

Comments
 (0)