Commit 143c6969 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov

* ioping: use system message for ENOMEM

err(1, NULL) prints program name and errno string, which is
just what we need in this case.
Signed-off-by: default avatarKir Kolyshkin <kir@openvz.org>

* free temp path string
parent b0ae5b53
......@@ -364,7 +364,7 @@ int main (int argc, char **argv)
char *temp = malloc(strlen(path) + strlen(tmpl) + 1);
if (!temp)
errx(1, "no memory");
err(1, NULL);
sprintf(temp, "%s%s", path, tmpl);
fd = mkostemp(temp, flags);
if (fd < 0)
......@@ -377,6 +377,7 @@ int main (int argc, char **argv)
}
if (fsync(fd))
err(1, "fsync failed");
free(temp);
} else if (S_ISREG(stat.st_mode)) {
fd = open(path, flags);
if (fd < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment