summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/util/xfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/util/xfile.c b/lib/util/xfile.c
index cf195706db..16499e1736 100644
--- a/lib/util/xfile.c
+++ b/lib/util/xfile.c
@@ -112,6 +112,7 @@ XFILE *x_fopen(const char *fname, int flags, mode_t mode)
if ((flags & O_ACCMODE) == O_RDWR) {
/* we don't support RDWR in XFILE - use file
descriptors instead */
+ SAFE_FREE(ret);
errno = EINVAL;
return NULL;
}