From 77bac5b78c10d816e02a8a407b0a4653d72868a0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 29 Jan 2009 17:16:34 -0800 Subject: [PATCH] Fix coverity CID#66. Resource leak in error path. Jeremy. --- lib/util/xfile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/util/xfile.c b/lib/util/xfile.c index cf195706db0b..16499e17367c 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; } -- 2.34.1