author | Lars Hjemli <hjemli@gmail.com> | 2006-12-16 13:58:20 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2006-12-16 13:58:20 (UTC) |
commit | aaa24bdd30303128bded8487cd9f63b54c3b8dcd (patch) (unidiff) | |
tree | 0fd8b32643c205d819f98a827eca3e78fad21bfa /shared.c | |
parent | fa82b03e05366e3c6ca1b74c8c83d6e00e0ef1e6 (diff) | |
download | cgit-aaa24bdd30303128bded8487cd9f63b54c3b8dcd.zip cgit-aaa24bdd30303128bded8487cd9f63b54c3b8dcd.tar.gz cgit-aaa24bdd30303128bded8487cd9f63b54c3b8dcd.tar.bz2 |
Add cgit_free_commitinfo() and use where needed
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | shared.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -79,12 +79,22 @@ void cgit_querystring_cb(const char *name, const char *value) | |||
79 | cgit_query_page = xstrdup(value); | 79 | cgit_query_page = xstrdup(value); |
80 | } else if (!strcmp(name, "h")) { | 80 | } else if (!strcmp(name, "h")) { |
81 | cgit_query_head = xstrdup(value); | 81 | cgit_query_head = xstrdup(value); |
82 | cgit_query_has_symref = 1; | 82 | cgit_query_has_symref = 1; |
83 | } else if (!strcmp(name, "id")) { | 83 | } else if (!strcmp(name, "id")) { |
84 | cgit_query_sha1 = xstrdup(value); | 84 | cgit_query_sha1 = xstrdup(value); |
85 | cgit_query_has_sha1 = 1; | 85 | cgit_query_has_sha1 = 1; |
86 | } else if (!strcmp(name, "ofs")) { | 86 | } else if (!strcmp(name, "ofs")) { |
87 | cgit_query_ofs = atoi(value); | 87 | cgit_query_ofs = atoi(value); |
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||
91 | void *cgit_free_commitinfo(struct commitinfo *info) | ||
92 | { | ||
93 | free(info->author); | ||
94 | free(info->author_email); | ||
95 | free(info->committer); | ||
96 | free(info->committer_email); | ||
97 | free(info->subject); | ||
98 | free(info); | ||
99 | return NULL; | ||
100 | } | ||