diff options
author | Yin Kangkai <kangkai.yin@linux.intel.com> | 2010-08-02 18:31:18 +0800 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2010-08-02 12:37:55 +0200 |
commit | 1851332c08e3f70ee172bbe5b153789da5df2df5 (patch) | |
tree | 378ebd2d9b1e52435375ddf54e1abeb24ee18405 /udev/udevd.c | |
parent | 5047f82de4d3b973281993516441a35cebcf1294 (diff) |
udevd: fix some memory leaks in error path
Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
Diffstat (limited to 'udev/udevd.c')
-rw-r--r-- | udev/udevd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/udev/udevd.c b/udev/udevd.c index 873634fe45..fbc237143c 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -227,8 +227,10 @@ static void worker_new(struct event *event) udev_monitor_enable_receiving(worker_monitor); worker = calloc(1, sizeof(struct worker)); - if (worker == NULL) + if (worker == NULL) { + udev_monitor_unref(worker_monitor); return; + } /* worker + event reference */ worker->refcount = 2; worker->udev = event->udev; |