pass: resmon: Fix memory leak of udev_monitor in error path 67/252567/1 accepted/tizen_6.0_unified tizen_6.0 accepted/tizen/6.0/unified/20210201.093355 submit/tizen_6.0/20210201.005217
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 29 Jan 2021 09:21:15 +0000 (18:21 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 29 Jan 2021 09:27:42 +0000 (18:27 +0900)
The resmon_uevent_add() has memory leak in error path. Fix the
memory leak.

Change-Id: I53c07b891b888cd1bdd596f872dd204f620d5b7c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
src/pass/pass-resmon.c

index b81a868e89c578bcdfa6f9701d67a62e4429a5c2..05396988c4f6bc80061c787c8212062240ffc141 100644 (file)
@@ -590,7 +590,7 @@ static int resmon_uevent_add(struct resmon *monitor)
                        _E("failed to invoke .init of resmon source  " \
                                "(res_name:%s, src_type: 0x%x)\n",
                                res->config_data.res_name, monitor->src_type);
-                       return ret;
+                       goto err_udev_monitor_fd;
                }
        }