summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunmin Lee <sunm.lee@samsung.com>2016-09-20 14:25:05 +0900
committerSunmin Lee <sunm.lee@samsung.com>2016-09-20 14:25:05 +0900
commit6c778d157733220e7c4eaba46b5c84b8a6583314 (patch)
treee3a013e3b5e79915fad1945a3aabc3b7b7523c49
parent1d54574aafb44faf41ba52b3334ce9e687993cf1 (diff)
downloadsystem-plugin-6c778d157733220e7c4eaba46b5c84b8a6583314.tar.gz
system-plugin-6c778d157733220e7c4eaba46b5c84b8a6583314.tar.bz2
system-plugin-6c778d157733220e7c4eaba46b5c84b8a6583314.zip
Fix handle leaks at systemd-user-helper. Change-Id: Ida4fe08c053379b8d27591844a4eae37a1476608 Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
-rw-r--r--src/systemd-user-helper/systemd-user-helper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/systemd-user-helper/systemd-user-helper.c b/src/systemd-user-helper/systemd-user-helper.c
index 2012e9d..2bffce6 100644
--- a/src/systemd-user-helper/systemd-user-helper.c
+++ b/src/systemd-user-helper/systemd-user-helper.c
@@ -38,6 +38,7 @@
sym = dlsym(handle, name); \
if (!sym) { \
fprintf(stderr, "dlsym %s error\n", name); \
+ dlclose(handle); \
return -1; \
} \
} while (0);
@@ -159,9 +160,11 @@ static int wait_condition(void)
r = wait_mount_user();
if (r < 0) {
fprintf(stderr, "wait_mout_user failed\n");
+ dlclose(h);
return r;
}
+ dlclose(h);
return 0;
}