diff options
author | Jeremy Allison <jra@samba.org> | 2003-03-07 00:34:43 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-03-07 00:34:43 +0000 |
commit | cea6fd0b0ae4131e8cb9e541a5c2e91ce226e5cd (patch) | |
tree | 583b43f60d1aa61b67fb9bd598b29908e8ae20b1 /source3/smbd | |
parent | 3327f13795c10bac2f2c38b22826a54a40e1a945 (diff) | |
download | samba-cea6fd0b0ae4131e8cb9e541a5c2e91ce226e5cd.tar.gz samba-cea6fd0b0ae4131e8cb9e541a5c2e91ce226e5cd.tar.bz2 samba-cea6fd0b0ae4131e8cb9e541a5c2e91ce226e5cd.zip |
Fix noticed by Corny.Bondad@hp.com. Ensure we free up memory on error exit.
Jeremy.
(This used to be commit 1cbd53dc3cd2d56f5e62d42fed5d589efcecb8f8)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/ipc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index 08337c2901..67c5da01f3 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -397,6 +397,7 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int if (tpscnt) { if((params = (char *)malloc(tpscnt)) == NULL) { DEBUG(0,("reply_trans: param malloc fail for %u bytes !\n", tpscnt)); + SAFE_FREE(data); END_PROFILE(SMBtrans); return(ERROR_DOS(ERRDOS,ERRnomem)); } @@ -412,6 +413,8 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int int i; if((setup = (uint16 *)malloc(suwcnt*sizeof(uint16))) == NULL) { DEBUG(0,("reply_trans: setup malloc fail for %u bytes !\n", (unsigned int)(suwcnt * sizeof(uint16)))); + SAFE_FREE(data); + SAFE_FREE(params); END_PROFILE(SMBtrans); return(ERROR_DOS(ERRDOS,ERRnomem)); } |