diff options
author | Junio C Hamano <junkio@cox.net> | 2006-08-27 21:19:39 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-27 21:19:39 -0700 |
commit | 4cac42b1324951579036a9d3ac403f5c2c3eeed8 (patch) | |
tree | 5106e1aff2bd1d90fef4c26550b777dbe1142429 /refs.c | |
parent | b3c952f8386cebe12fc95227866683bb1cec99a9 (diff) | |
download | git-4cac42b1324951579036a9d3ac403f5c2c3eeed8.tar.gz |
free(NULL) is perfectly valid.
Jonas noticed some places say "if (X) free(X)" which is totally
unnecessary.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -348,10 +348,8 @@ void unlock_ref(struct ref_lock *lock) if (lock->lk) rollback_lock_file(lock->lk); } - if (lock->ref_file) - free(lock->ref_file); - if (lock->log_file) - free(lock->log_file); + free(lock->ref_file); + free(lock->log_file); free(lock); } |