X-Git-Url: https://pd.if.org/git/?p=zpackage;a=blobdiff_plain;f=lib%2Fnotes.c;h=b29cbc79f5438ad83a78c8c3952853a7aa0c73a9;hp=b337fd446756a320330519e6f6bfaa7a3a48eea1;hb=d697639ca6483bdee0ab043f85a2266fe7c62956;hpb=f523c503b7afe9964eb2c659f42c3cabbe725ae2 diff --git a/lib/notes.c b/lib/notes.c index b337fd4..b29cbc7 100644 --- a/lib/notes.c +++ b/lib/notes.c @@ -69,7 +69,7 @@ int64_t zpm_note(struct zpm *zpm, struct zpm_note *n, unsigned int flags) { n->path = colstring(st, 4); n->file = colstring(st, 5); n->ack = sqlite3_column_int(st, 6); - n->ts = sqlite3_column_int(st, 1); + n->ts = colstring(st, 1); n->id = sqlite3_column_int64(st, 0); id = n->id; break; @@ -87,7 +87,8 @@ void zpm_note_free(struct zpm_note *n) { free(n->pkgid); free(n->path); free(n->file); - n->note = n->pkgid = n->path = n->file = 0; + free(n->ts); + n->note = n->ts = n->pkgid = n->path = n->file = 0; } int zpm_notes_available(struct zpm *zpm, int flags) {