X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fdata%2Ffile-name.c;fp=src%2Fdata%2Ffile-name.c;h=82279f77b1e2676d5c3e41915b60e734fde64dea;hb=7a887989fb1da56ebd264ee3338c1472c7e40a51;hp=f8ad11d07a342f22fd5bf4cfa026d9a93a412ce0;hpb=c3bd77adba5746aae895e6a354aada4e694c0e3f;p=pspp-builds.git diff --git a/src/data/file-name.c b/src/data/file-name.c index f8ad11d0..82279f77 100644 --- a/src/data/file-name.c +++ b/src/data/file-name.c @@ -28,14 +28,16 @@ #include "intprops.h" #include "minmax.h" #include "dirname.h" +#include "xmalloca.h" -#include #include #include #include #include #include +#include "xalloc.h" + #include "gettext.h" #define _(msgid) gettext (msgid) @@ -279,13 +281,13 @@ fn_open (const char *fn, const char *mode) if (get_safer_mode ()) return safety_violation (fn); - s = local_alloc (strlen (fn)); + s = xmalloca (strlen (fn)); memcpy (s, fn, strlen (fn) - 1); s[strlen (fn) - 1] = 0; f = popen (s, mode[0] == 'r' ? "r" : "w"); - local_free (s); + freea (s); return f; }