From dd4fdf5a0aafe97547d1d5f996c0fed9c34ca52b Mon Sep 17 00:00:00 2001 From: Bartlomiej Kunikowski Date: Tue, 22 Nov 2016 09:37:20 +0100 Subject: [PATCH] Check if privilege is NULL before free it Change-Id: Ia100e9e46d76bf261f22a057644e640ad5e632f8 --- src/pkgmgrinfo_basic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pkgmgrinfo_basic.c b/src/pkgmgrinfo_basic.c index 924cc2c..b306af0 100644 --- a/src/pkgmgrinfo_basic.c +++ b/src/pkgmgrinfo_basic.c @@ -237,6 +237,8 @@ static void __ps_free_support_size(gpointer data) static void __ps_free_privilege(gpointer data) { privilege_x *privilege = (privilege_x *)data; + if (privilege == NULL) + return; if (privilege->type) free((void *)privilege->type); if (privilege->value) -- 2.7.4