projects
/
platform
/
core
/
appfw
/
pkgmgr-info.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
0c0c530
)
Fix memory leak
56/167156/2
author
Seungha Son
<seungha.son@samsung.com>
Tue, 16 Jan 2018 01:32:09 +0000
(10:32 +0900)
committer
Sangyoon Jang
<jeremy.jang@samsung.com>
Wed, 17 Jan 2018 05:25:04 +0000
(
05:25
+0000)
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: Ie70c36a8d56acb5b13b9ae7812a4c58f2d42a035
src/pkgmgrinfo_certinfo.c
patch
|
blob
|
history
diff --git
a/src/pkgmgrinfo_certinfo.c
b/src/pkgmgrinfo_certinfo.c
index
ba072d6
..
f867c61
100644
(file)
--- a/
src/pkgmgrinfo_certinfo.c
+++ b/
src/pkgmgrinfo_certinfo.c
@@
-464,6
+464,8
@@
API int pkgmgrinfo_set_cert_value(pkgmgrinfo_instcertinfo_h handle, pkgmgrinfo_i
retvm_if(cert_type > PMINFO_SET_DISTRIBUTOR2_SIGNER_CERT, PMINFO_R_EINVAL, "Invalid certificate type\n");
pkgmgr_instcertinfo_x *certinfo = NULL;
certinfo = (pkgmgr_instcertinfo_x *)handle;
+ if (certinfo->cert_info[cert_type])
+ free(certinfo->cert_info[cert_type]);
(certinfo->cert_info)[cert_type] = strdup(cert_value);
return PMINFO_R_OK;
}