Author: vlendec Date: 2006-03-12 17:48:51 +0000 (Sun, 12 Mar 2006) New Revision: 14246
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14246 Log: Fix Coverity bug # 85 Modified: branches/SAMBA_3_0/source/client/clitar.c trunk/source/client/clitar.c Changeset: Modified: branches/SAMBA_3_0/source/client/clitar.c =================================================================== --- branches/SAMBA_3_0/source/client/clitar.c 2006-03-12 17:44:00 UTC (rev 14245) +++ branches/SAMBA_3_0/source/client/clitar.c 2006-03-12 17:48:51 UTC (rev 14246) @@ -1112,6 +1112,7 @@ /* Get us to the next block, or the first block first time around */ if (next_block(tarbuf, &buffer_p, tbufsiz) <= 0) { DEBUG(0, ("Empty file, short tar file, or read error: %s\n", strerror(errno))); + SAFE_FREE(longfilename); return; } @@ -1183,6 +1184,7 @@ } break; case 'L': + SAFE_FREE(longfilename); longfilename = get_longfilename(finfo); if (!longfilename) { DEBUG(0, ("abandoning restore\n")); Modified: trunk/source/client/clitar.c =================================================================== --- trunk/source/client/clitar.c 2006-03-12 17:44:00 UTC (rev 14245) +++ trunk/source/client/clitar.c 2006-03-12 17:48:51 UTC (rev 14246) @@ -1111,6 +1111,7 @@ /* Get us to the next block, or the first block first time around */ if (next_block(tarbuf, &buffer_p, tbufsiz) <= 0) { DEBUG(0, ("Empty file, short tar file, or read error: %s\n", strerror(errno))); + SAFE_FREE(longfilename); return; } @@ -1182,6 +1183,7 @@ } break; case 'L': + SAFE_FREE(longfilename); longfilename = get_longfilename(finfo); if (!longfilename) { DEBUG(0, ("abandoning restore\n"));
