summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
376fdc7)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
if ((asprintf(&filename, "%s/.%s.uci-XXXXXX", ctx->confdir, p->e.name) < 0) || !filename)
UCI_THROW(ctx, UCI_ERR_MEM);
if ((asprintf(&filename, "%s/.%s.uci-XXXXXX", ctx->confdir, p->e.name) < 0) || !filename)
UCI_THROW(ctx, UCI_ERR_MEM);
+ if (!mktemp(filename))
+ *filename = 0;
+
if (!*filename) {
free(filename);
UCI_THROW(ctx, UCI_ERR_IO);
if (!*filename) {
free(filename);
UCI_THROW(ctx, UCI_ERR_IO);