svn commit: samba r14021 - in trunk/source/lib: .
jra at samba.org
jra at samba.org
Wed Mar 8 06:36:50 GMT 2006
Author: jra
Date: 2006-03-08 06:36:49 +0000 (Wed, 08 Mar 2006)
New Revision: 14021
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14021
Log:
Coverity bug CID #66. Missing free on error exit.
Jeremy.
Modified:
trunk/source/lib/xfile.c
Changeset:
Modified: trunk/source/lib/xfile.c
===================================================================
--- trunk/source/lib/xfile.c 2006-03-08 06:36:40 UTC (rev 14020)
+++ trunk/source/lib/xfile.c 2006-03-08 06:36:49 UTC (rev 14021)
@@ -96,13 +96,16 @@
XFILE *ret;
ret = SMB_MALLOC_P(XFILE);
- if (!ret) return NULL;
+ if (!ret) {
+ return NULL;
+ }
memset(ret, 0, sizeof(XFILE));
if ((flags & O_ACCMODE) == O_RDWR) {
/* we don't support RDWR in XFILE - use file
descriptors instead */
+ SAFE_FREE(ret);
errno = EINVAL;
return NULL;
}
More information about the samba-cvs
mailing list