Tmp was not freed in case of errors in save_branch().

This commit is contained in:
Peter Berg Larsen 2005-03-10 11:18:31 +00:00 committed by Alexandre Julliard
parent f79863d20f
commit 514f432031
1 changed files with 2 additions and 2 deletions

View File

@ -1639,11 +1639,11 @@ static int save_branch( struct key *key, const char *path )
/* if successfully written, rename to final name */
if (ret) ret = !rename( tmp, path );
if (!ret) unlink( tmp );
free( tmp );
}
done:
if (real) free( real );
free( tmp );
free( real );
if (ret) make_clean( key );
return ret;
}