Fix possible double-free issue 52/238452/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 14 Jul 2020 04:46:16 +0000 (13:46 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 14 Jul 2020 04:46:16 +0000 (13:46 +0900)
Change-Id: Ib0ef53d5e6f77eba3f4d5e8af186613dacb6ea22
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
plugin/app2sd/server/app2sd_internals.c

index e8f849b..a8cf62e 100644 (file)
@@ -223,6 +223,7 @@ int _app2sd_dmcrypt_open_device(const char *pkgid, const char *loopback_device,
        if (ret < 0 || ret > size) {
                        _E("snprintf fail\n");
                        free(*dev_node);
+                       *dev_node = NULL;
                        return -1;
        }
        return 0;