projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Revert "sysupgrade: print errno on failure"
[project/procd.git]
/
uxc.c
diff --git
a/uxc.c
b/uxc.c
index 230e19bf6032ac5a2d90216d25b6ec7ee3c930f7..c15b4bc42cbeb93b0262edc741b4d025fcf1a197 100644
(file)
--- a/
uxc.c
+++ b/
uxc.c
@@
-1032,9
+1032,12
@@
static int uxc_set(char *name, char *path, signed char autostart, char *pidfile,
char *t1, *t2;
t1 = strdup(cfname);
t2 = strrchr(t1, '/');
+ if (!t2)
+ return -EINVAL;
+
*t2 = '\0';
- if (asprintf(&t2, "%s/settings", t1
, name
) == -1)
+ if (asprintf(&t2, "%s/settings", t1) == -1)
return -ENOMEM;
ret = mkdir(t2, 0755);