projects
/
project
/
ubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
valgrind complained about these
[project/ubus.git]
/
libubus-obj.c
diff --git
a/libubus-obj.c
b/libubus-obj.c
index
b301965
..
c1931b3
100644
(file)
--- a/
libubus-obj.c
+++ b/
libubus-obj.c
@@
-31,7
+31,8
@@
ubus_process_unsubscribe(struct ubus_context *ctx, struct ubus_msghdr *hdr,
if (s->remove_cb)
s->remove_cb(ctx, s, blob_get_u32(attrbuf[UBUS_ATTR_TARGET]));
if (s->remove_cb)
s->remove_cb(ctx, s, blob_get_u32(attrbuf[UBUS_ATTR_TARGET]));
- close(fd);
+ if (fd >= 0)
+ close(fd);
}
static void
}
static void
@@
-45,7
+46,8
@@
ubus_process_notify(struct ubus_context *ctx, struct ubus_msghdr *hdr,
if (obj->subscribe_cb)
obj->subscribe_cb(ctx, obj);
if (obj->subscribe_cb)
obj->subscribe_cb(ctx, obj);
- close(fd);
+ if (fd >= 0)
+ close(fd);
}
static void
ubus_process_invoke(struct ubus_context *ctx, struct ubus_msghdr *hdr,
}
static void
ubus_process_invoke(struct ubus_context *ctx, struct ubus_msghdr *hdr,