ui-plain: fix resource leak: free before assigning NULL

Coverity-id: 13939
Signed-off-by: Christian Hesse <mail@eworm.de>
Bu işleme şunda yer alıyor:
Christian Hesse 2015-10-09 14:55:50 +02:00 işlemeyi yapan: Jason A. Donenfeld
ebeveyn 979db79a80
işleme 08a2b818f2
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme

Dosyayı Görüntüle

@ -84,8 +84,10 @@ static void print_dir(const unsigned char *sha1, const char *base,
slash = strrchr(fullpath, '/');
if (slash)
*(slash + 1) = 0;
else
else {
free(fullpath);
fullpath = NULL;
}
html("<li>");
cgit_plain_link("../", NULL, NULL, ctx.qry.head, ctx.qry.sha1,
fullpath);