summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 125b99103e..b058f8b8b4 100644
--- a/util.c
+++ b/util.c
@@ -748,7 +748,7 @@ ruby_getcwd(void)
while (!getcwd(buf, size)) {
if (errno != ERANGE) {
- free(buf);
+ xfree(buf);
rb_sys_fail("getcwd");
}
size *= 2;
@@ -761,7 +761,7 @@ ruby_getcwd(void)
char *buf = xmalloc(PATH_MAX+1);
if (!getwd(buf)) {
- free(buf);
+ xfree(buf);
rb_sys_fail("getwd");
}
#endif