mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 20:04:11 +00:00
sharpd: Fix sharpd memory leak
Free path Signed-off-by: Keelan Cannoo <keelan.cannoo@icloud.com>
This commit is contained in:
parent
bdf62ec61b
commit
5aa36ff77b
@ -88,7 +88,7 @@ static struct c_path *cpath_copy(struct c_path *dest, const struct c_path *src)
|
|||||||
*
|
*
|
||||||
* @param path Constrained Path structure to be deleted
|
* @param path Constrained Path structure to be deleted
|
||||||
*/
|
*/
|
||||||
static void cpath_del(struct c_path *path)
|
void cpath_del(struct c_path *path)
|
||||||
{
|
{
|
||||||
if (!path)
|
if (!path)
|
||||||
return;
|
return;
|
||||||
|
@ -191,6 +191,8 @@ extern void cspf_del(struct cspf *algo);
|
|||||||
*/
|
*/
|
||||||
extern struct c_path *compute_p2p_path(struct cspf *algo, struct ls_ted *ted);
|
extern struct c_path *compute_p2p_path(struct cspf *algo, struct ls_ted *ted);
|
||||||
|
|
||||||
|
extern void cpath_del(struct c_path *path);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1245,6 +1245,7 @@ DEFPY (show_sharp_cspf,
|
|||||||
}
|
}
|
||||||
if (path->status != SUCCESS) {
|
if (path->status != SUCCESS) {
|
||||||
vty_out(vty, "Path computation failed: %d\n", path->status);
|
vty_out(vty, "Path computation failed: %d\n", path->status);
|
||||||
|
cpath_del(path);
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1260,7 +1261,7 @@ DEFPY (show_sharp_cspf,
|
|||||||
&edge->attributes->standard.remote6);
|
&edge->attributes->standard.remote6);
|
||||||
}
|
}
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
|
cpath_del(path);
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user