summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-01-29 17:16:34 -0800
committerJeremy Allison <jra@samba.org>2009-01-29 17:16:34 -0800
commit77bac5b78c10d816e02a8a407b0a4653d72868a0 (patch)
tree8fac6ad02833af31cf0ceda652afa5d8be129db4 /lib
parent864852a4ae1b0c0d1cf1afdcd042c9113f51acd6 (diff)
downloadsamba-77bac5b78c10d816e02a8a407b0a4653d72868a0.tar.gz
samba-77bac5b78c10d816e02a8a407b0a4653d72868a0.tar.bz2
samba-77bac5b78c10d816e02a8a407b0a4653d72868a0.zip
Fix coverity CID#66. Resource leak in error path.
Jeremy.
Diffstat (limited to 'lib')
-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;
}