mirror of
https://github.com/troglobit/finit.git
synced 2026-10-22 11:36:07 +00:00
cgroup: fix use before NULL check, found by Coverity Scan
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
85fa0d4926
commit
badf8701bf
1 file changed
+1
-6
+1
-6
@@ -180,11 +180,6 @@ static void cgroup_handle_event(char *event, uint32_t mask)
|
|||||||
char *ptr;
|
char *ptr;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
||||||
if (!event) {
|
|
||||||
_d("Missing event with mask: %08x", mask);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_d("event: '%s', mask: %08x", event, mask);
|
_d("event: '%s', mask: %08x", event, mask);
|
||||||
if (!(mask & IN_MODIFY))
|
if (!(mask & IN_MODIFY))
|
||||||
return;
|
return;
|
||||||
@@ -245,7 +240,7 @@ static void cgroup_events_cb(uev_t *w, void *arg, int events)
|
|||||||
|
|
||||||
/* Find base path for this event */
|
/* Find base path for this event */
|
||||||
iwp = iwatch_find_by_wd(&iw_cgroup, ev->wd);
|
iwp = iwatch_find_by_wd(&iw_cgroup, ev->wd);
|
||||||
if (!iwp)
|
if (!iwp || !iwp->path)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
cgroup_handle_event(iwp->path, ev->mask);
|
cgroup_handle_event(iwp->path, ev->mask);
|
||||||
|
|||||||
Reference in new issue
Block a user