Skip to content

Instantly share code, notes, and snippets.

@razvancrainea
Created March 10, 2017 09:48
Show Gist options
  • Save razvancrainea/03a43bfa8b554a7ca89f2740a3c54c96 to your computer and use it in GitHub Desktop.
Save razvancrainea/03a43bfa8b554a7ca89f2740a3c54c96 to your computer and use it in GitHub Desktop.
Dynamic routing pkg memory leak when using GW whitelist
diff --git a/modules/drouting/drouting.c b/modules/drouting/drouting.c
index 7b0c3544b..a4e0d1ebe 100644
--- a/modules/drouting/drouting.c
+++ b/modules/drouting/drouting.c
@@ -3095,9 +3095,11 @@ no_gws:
}
}
+ if (wl_list) pkg_free(wl_list);
if (ruri_buf) pkg_free(ruri_buf);
return 1;
error2:
+ if (wl_list) pkg_free(wl_list);
/* we are done reading -> unref the data */
lock_stop_read( current_partition->ref_lock );
error1:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment