Skip to content

Commit

Permalink
fix segfault due to missing LinkTable allocation
Browse files Browse the repository at this point in the history
LinkTable_new dereferences a NULL linktbl pointer when it does not load
the link table from disk. It needs to allocate the new LinkTable object.

Fixes: 0747566 ("updated LinkTable invalidation")
  • Loading branch information
michich authored and fangfufu committed Jul 13, 2024
1 parent dd7b879 commit 1f91111
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ LinkTable *LinkTable_new(const char *url)
* disk
*/
if (!linktbl) {
linktbl = LinkTable_alloc(url);
linktbl->index_time = time(NULL);
lprintf(debug, "linktbl->index_time: %d\n", linktbl->index_time);

Expand Down

0 comments on commit 1f91111

Please sign in to comment.