diff options
| author | Christian Hesse | 2015-10-10 16:56:25 +0200 |
|---|---|---|
| committer | Jason A. Donenfeld | 2015-10-10 21:39:53 +0200 |
| commit | 97da17b783697b4c5430f130ab449121d0692530 (patch) | |
| tree | d46e87dafbf26cd21233aee0f6dbdac30f1bd98a /ui-atom.c | |
| parent | 7320bfa893bdb8ff873c3827c3dac1ce0d4034ea (diff) | |
| download | cgit-97da17b783697b4c5430f130ab449121d0692530.tar.gz cgit-97da17b783697b4c5430f130ab449121d0692530.tar.bz2 cgit-97da17b783697b4c5430f130ab449121d0692530.zip | |
ui-atom: fix resource leak: free allocation from cgit_repourl
Coverity-id: 13947
Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'ui-atom.c')
| -rw-r--r-- | ui-atom.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -125,11 +125,13 @@ void cgit_print_atom(char *tip, char *path, int max_count) | |||
| 125 | html_txt(ctx.repo->desc); | 125 | html_txt(ctx.repo->desc); |
| 126 | html("</subtitle>\n"); | 126 | html("</subtitle>\n"); |
| 127 | if (host) { | 127 | if (host) { |
| 128 | char *repourl = cgit_repourl(ctx.repo->url); | ||
| 128 | html("<link rel='alternate' type='text/html' href='"); | 129 | html("<link rel='alternate' type='text/html' href='"); |
| 129 | html(cgit_httpscheme()); | 130 | html(cgit_httpscheme()); |
| 130 | html_attr(host); | 131 | html_attr(host); |
| 131 | html_attr(cgit_repourl(ctx.repo->url)); | 132 | html_attr(repourl); |
| 132 | html("'/>\n"); | 133 | html("'/>\n"); |
| 134 | free(repourl); | ||
| 133 | } | 135 | } |
| 134 | while ((commit = get_revision(&rev)) != NULL) { | 136 | while ((commit = get_revision(&rev)) != NULL) { |
| 135 | add_entry(commit, host); | 137 | add_entry(commit, host); |
