summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c74ba3d)
raw | patch | inline | side by side (parent: c74ba3d)
author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 6 Feb 2007 17:05:51 +0000 (12:05 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 6 Feb 2007 17:05:51 +0000 (12:05 -0500) |
There is no need to check for a NULL pointer before invoking free(),
the runtime library automatically performs this check anyway and
does nothing if a NULL pointer is supplied.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
the runtime library automatically performs this check anyway and
does nothing if a NULL pointer is supplied.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | patch | blob | history |
diff --git a/fast-import.c b/fast-import.c
index c0cadc4279dc0eebf476a831b6cf8ed767eadd6d..4dcba416e098efc785fe7b28a37f1fa823d5548b 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
pack_size += s.total_out;
free(out);
- if (delta)
- free(delta);
+ free(delta);
if (last) {
- if (last->data && !last->no_free)
+ if (!last->no_free)
free(last->data);
last->data = dat;
last->offset = e->offset;
}
tree_content_set(&b->branch_tree, p, sha1, S_IFREG | mode);
-
- if (p_uq)
- free(p_uq);
+ free(p_uq);
}
static void file_change_d(struct branch *b)
p = p_uq;
}
tree_content_remove(&b->branch_tree, p);
- if (p_uq)
- free(p_uq);
+ free(p_uq);
}
static void cmd_from(struct branch *b)
sp += sprintf(sp, "%s\n\n", committer);
memcpy(sp, msg, msglen);
sp += msglen;
- if (author)
- free(author);
+ free(author);
free(committer);
free(msg);