Skip to content

Commit 3f7ddc4

Browse files
davidtrihy-genesysbenceszigeti
authored andcommitted
TELECOM-12357: Fix memory leak when cleaning up
1 parent a8ed644 commit 3f7ddc4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/topology_hiding/topo_hiding_logic.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -909,10 +909,10 @@ static int _th_no_dlg_rebuild_routes(size_t route_sets_size, str *routes[static
909909
cleanup:
910910
for (int x = i; x < route_sets_size; x++) {
911911
/* Assume the first lmp successfully added so we don't want to free the header */
912-
if (route_hdrs[i])
913-
pkg_free(route_hdrs[i]);
914-
pkg_free(routes[i]->s);
915-
routes[i]->len = 0;
912+
if (route_hdrs[x])
913+
pkg_free(route_hdrs[x]);
914+
pkg_free(routes[x]->s);
915+
routes[x]->len = 0;
916916
}
917917

918918
return rc;

0 commit comments

Comments
 (0)