Fix memory leak 78/234878/1
authorIlho Kim <ilho159.kim@samsung.com>
Fri, 29 May 2020 10:11:21 +0000 (19:11 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Fri, 29 May 2020 10:11:21 +0000 (19:11 +0900)
preload_rw_list's element should be freed by __free_pkginfo()

Change-Id: Ide3118860f4d2bd048964180b09dae380d63a8b9
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/install_preload_pkg.c

index d73894d..71e5542 100644 (file)
@@ -206,7 +206,7 @@ static int _install_preload_pkg(const char *backend, const char *directory,
                                        strerror_r(errno, err_buf,
                                                        sizeof(err_buf)));
                        closedir(dir);
-                       g_list_free_full(preload_rw_pkg_list, free);
+                       g_list_free_full(preload_rw_pkg_list, __free_pkginfo);
                        return -1;
                }
        }