projects
/
platform
/
core
/
appfw
/
launchpad.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18488c0
)
Fix memory leak
32/310932/2
author
Hwankyu Jhun
<h.jhun@samsung.com>
Fri, 10 May 2024 01:28:18 +0000
(10:28 +0900)
committer
Hwankyu Jhun
<h.jhun@samsung.com>
Fri, 10 May 2024 02:06:22 +0000
(11:06 +0900)
The allocated raw variable must be release before returning the function.
Change-Id: I1f7a4de45448b6ea5779c523476e3c045f66fd78
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad-process-pool/src/loader_mount.c
patch
|
blob
|
history
diff --git
a/src/launchpad-process-pool/src/loader_mount.c
b/src/launchpad-process-pool/src/loader_mount.c
index 52fa82024eed9b9afac5dbd0560af5a3cf62709f..fd37e0d47e60fc2fd20f70000a52b6570ca1e44a 100644
(file)
--- a/
src/launchpad-process-pool/src/loader_mount.c
+++ b/
src/launchpad-process-pool/src/loader_mount.c
@@
-226,10
+226,12
@@
static int __read(parcel_h parcel)
ret = _socket_read(__context.read_socket, raw, raw_size);
if (ret != 0) {
_E("_socket_read() is failed. error(%d)", ret);
+ free(raw);
return -1;
}
parcel_reset(parcel, raw, (uint32_t)raw_size);
+ free(raw);
return 0;
}
@@
-426,4
+428,4
@@
int _loader_mount_mount(pid_t pid, bundle *kb)
parcel_destroy(parcel);
return ret;
-}
\ No newline at end of file
+}