projects
/
project
/
ubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
libubus.h: add ubus_auto_shutdown()
[project/ubus.git]
/
libubus.c
diff --git
a/libubus.c
b/libubus.c
index
bfbaeb6
..
d52faff
100644
(file)
--- a/
libubus.c
+++ b/
libubus.c
@@
-358,6
+358,8
@@
struct ubus_context *ubus_connect(const char *path)
void ubus_shutdown(struct ubus_context *ctx)
{
blob_buf_free(&b);
+ if (!ctx)
+ return;
close(ctx->sock.fd);
free(ctx->msgbuf.data);
}