diff options
Diffstat (limited to 'src/ucm/main.c')
-rw-r--r-- | src/ucm/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ucm/main.c b/src/ucm/main.c index 4f36648c..2ff4d3f3 100644 --- a/src/ucm/main.c +++ b/src/ucm/main.c @@ -572,16 +572,17 @@ static int execute_sysw(const char *sysw) wlen = write(fd, value, len); myerrno = errno; close(fd); - free(s); if (ignore_error) - return 0; + goto __end; if (wlen != (ssize_t)len) { uc_error("unable to write '%s' to '%s': %s", value, path, strerror(myerrno)); return -EINVAL; } +__end: + free(s); return 0; } |