projects
/
platform
/
core
/
system
/
update-control.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b03701
)
fota: Fix to call free() before return
20/314620/1
author
SangYoun Kwak
<sy.kwak@samsung.com>
Tue, 16 Jul 2024 08:29:29 +0000
(17:29 +0900)
committer
SangYoun Kwak
<sy.kwak@samsung.com>
Tue, 16 Jul 2024 08:32:33 +0000
(17:32 +0900)
A variable delta_dir stores newly allocated memory as a char array but
it was not freed before return. It is a resource leackage.
To fix it, free() is added right after the last usage of this variable.
Change-Id: I6c3e9009cc4721738e0d72d45f42affd52809482
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
update-manager/fota/fota-installer.c
patch
|
blob
|
history
diff --git
a/update-manager/fota/fota-installer.c
b/update-manager/fota/fota-installer.c
index 609214c3a6851da33bfd40f3ad300e54f9aeb221..2c41b5a225046ca744408b0d16a173fc2fc7cc96 100644
(file)
--- a/
update-manager/fota/fota-installer.c
+++ b/
update-manager/fota/fota-installer.c
@@
-173,6
+173,7
@@
int find_delta_and_prepare_script(pid_t sender_pid, struct deltas *deltas)
return -1;
}
_FLOGI("Delta directory found: %s", delta_dir);
+ free(delta_dir);
/* Prepare fota dir */
ret = util_file_mkdir(FOTA_DIR);