aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-07-11 19:50:46 +0000
committerTiago Cunha <tcunha@gmx.com>2012-07-11 19:50:46 +0000
commit513bd8f62d4159bae1d9825c1300bcf83287c1d3 (patch)
tree5b3b7398da7c2245c460f2a353ceeb043b5c66f9
parent1f5e6e35d5046693f0ef5ec76535f517757b7122 (diff)
downloadrtmux-513bd8f62d4159bae1d9825c1300bcf83287c1d3.tar.gz
rtmux-513bd8f62d4159bae1d9825c1300bcf83287c1d3.tar.bz2
rtmux-513bd8f62d4159bae1d9825c1300bcf83287c1d3.zip
Remove remaining xfree calls from the portable version.
-rw-r--r--compat/asprintf.c2
-rw-r--r--osdep-linux.c6
-rw-r--r--osdep-sunos.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/compat/asprintf.c b/compat/asprintf.c
index 861232a5..66f00996 100644
--- a/compat/asprintf.c
+++ b/compat/asprintf.c
@@ -53,7 +53,7 @@ vasprintf(char **ret, const char *fmt, va_list ap)
*ret = xmalloc(n + 1);
if ((n = vsnprintf(*ret, n + 1, fmt, ap2)) < 0) {
- xfree(*ret);
+ free(*ret);
goto error;
}
diff --git a/osdep-linux.c b/osdep-linux.c
index 6e4430b8..8adf202b 100644
--- a/osdep-linux.c
+++ b/osdep-linux.c
@@ -40,10 +40,10 @@ osdep_get_name(int fd, unused char *tty)
xasprintf(&path, "/proc/%lld/cmdline", (long long) pgrp);
if ((f = fopen(path, "r")) == NULL) {
- xfree(path);
+ free(path);
return (NULL);
}
- xfree(path);
+ free(path);
len = 0;
buf = NULL;
@@ -69,7 +69,7 @@ osdep_get_cwd(pid_t pid)
xasprintf(&path, "/proc/%d/cwd", pid);
n = readlink(path, target, MAXPATHLEN);
- xfree(path);
+ free(path);
if (n > 0) {
target[n] = '\0';
return (target);
diff --git a/osdep-sunos.c b/osdep-sunos.c
index 6ba27691..bb67412c 100644
--- a/osdep-sunos.c
+++ b/osdep-sunos.c
@@ -49,7 +49,7 @@ osdep_get_name(int fd, char *tty)
xasprintf(&path, "/proc/%u/psinfo", (u_int) pgrp);
f = open(path, O_RDONLY);
- xfree(path);
+ free(path);
if (f < 0)
return (NULL);
@@ -73,7 +73,7 @@ osdep_get_cwd(pid_t pid)
xasprintf(&path, "/proc/%u/path/cwd", (u_int) pid);
n = readlink(path, target, MAXPATHLEN);
- xfree(path);
+ free(path);
if (n > 0) {
target[n] = '\0';
return (target);