From: Jeremy Allison Date: Fri, 30 Jan 2009 01:16:34 +0000 (-0800) Subject: Fix coverity CID#66. Resource leak in error path. X-Git-Url: http://git.samba.org/samba.git/?p=jra%2Fsamba%2F.git;a=commitdiff_plain;h=77bac5b78c10d816e02a8a407b0a4653d72868a0 Fix coverity CID#66. Resource leak in error path. Jeremy. --- diff --git a/lib/util/xfile.c b/lib/util/xfile.c index cf195706db0..16499e17367 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; }