diff options
author | lvklevankhanh <119659574+lvklevankhanh@users.noreply.github.com> | 2023-02-09 16:36:45 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-09 16:36:45 +0700 |
commit | e97c14faa6560a882c3d861540b804f1af5e47d0 (patch) | |
tree | 6ce7ca6351ed046e8f78ab13e1e87eabfcf0243f | |
parent | 0642a21dce31502bae7a3d7513a95772c9b4ae3f (diff) | |
parent | b6149e203f919c899fefc702a17fbb78bdec3700 (diff) | |
download | DLT-daemon-e97c14faa6560a882c3d861540b804f1af5e47d0.tar.gz |
Merge pull request #441 from lvklevankhanh/fix_memory_leak
Fix memory leak
-rw-r--r-- | src/console/dlt-control-common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/console/dlt-control-common.c b/src/console/dlt-control-common.c index abcaf92..64951c1 100644 --- a/src/console/dlt-control-common.c +++ b/src/console/dlt-control-common.c @@ -124,6 +124,8 @@ void set_ecuid(char *ecuid) if (dlt_parse_config_param("ECUId", &ecuid_conf) == 0) { memset(local_ecuid, 0, DLT_CTRL_ECUID_LEN); strncpy(local_ecuid, ecuid_conf, DLT_CTRL_ECUID_LEN); + if (ecuid_conf !=NULL) + free(ecuid_conf); local_ecuid[DLT_CTRL_ECUID_LEN - 1] = '\0'; } else { |