Author: vlendec Date: 2007-07-27 08:24:14 +0000 (Fri, 27 Jul 2007) New Revision: 24064
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24064 Log: Fix memleaks found by Atsushi Nakabayashi <[EMAIL PROTECTED]> Thanks! Volker P.S.: I really wonder --- do you inspect our code at that level manually, or do you have an automated tool? Modified: branches/SAMBA_3_0_25/source/lib/messages.c Changeset: Modified: branches/SAMBA_3_0_25/source/lib/messages.c =================================================================== --- branches/SAMBA_3_0_25/source/lib/messages.c 2007-07-27 07:27:14 UTC (rev 24063) +++ branches/SAMBA_3_0_25/source/lib/messages.c 2007-07-27 08:24:14 UTC (rev 24064) @@ -281,12 +281,14 @@ if (tdb_chainlock_with_timeout(tdb, kbuf, timeout) == -1) { DEBUG(0,("message_send_pid_internal: failed to get " "chainlock with timeout %ul.\n", timeout)); + SAFE_FREE(dbuf.dptr); return NT_STATUS_IO_TIMEOUT; } } else { if (tdb_chainlock(tdb, kbuf) == -1) { DEBUG(0,("message_send_pid_internal: failed to get " "chainlock.\n")); + SAFE_FREE(dbuf.dptr); return NT_STATUS_LOCK_NOT_GRANTED; } } @@ -303,12 +305,14 @@ if (tdb_chainlock_with_timeout(tdb, kbuf, timeout) == -1) { DEBUG(0,("message_send_pid_internal: failed to get chainlock " "with timeout %ul.\n", timeout)); + SAFE_FREE(dbuf.dptr); return NT_STATUS_IO_TIMEOUT; } } else { if (tdb_chainlock(tdb, kbuf) == -1) { DEBUG(0,("message_send_pid_internal: failed to get " "chainlock.\n")); + SAFE_FREE(dbuf.dptr); return NT_STATUS_LOCK_NOT_GRANTED; } }
