From: Louis Scalbert Date: Tue, 13 Dec 2022 14:05:04 +0000 (+0100) Subject: lib: fix ls_prefix memory allocation X-Git-Tag: base_8.5~147^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F12508%2Fhead;p=mirror%2Ffrr.git lib: fix ls_prefix memory allocation The wrong size is allocated for struct ls_prefix memory. Fix ls_prefix memory allocation. Fixes: b0c0b43348 ("lib: Update Link State Database") Signed-off-by: Louis Scalbert --- diff --git a/lib/link_state.c b/lib/link_state.c index ab5a8515b5..1b79c79216 100644 --- a/lib/link_state.c +++ b/lib/link_state.c @@ -346,7 +346,7 @@ struct ls_prefix *ls_prefix_new(struct ls_node_id adv, struct prefix p) if (adv.origin == UNKNOWN) return NULL; - new = XCALLOC(MTYPE_LS_DB, sizeof(struct ls_attributes)); + new = XCALLOC(MTYPE_LS_DB, sizeof(struct ls_prefix)); new->adv = adv; new->pref = p;