varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
185 stars 86 forks source link

xkey: plug xkey_cleanup memory leaks #188

Closed asadsa92 closed 3 years ago

asadsa92 commented 3 years ago

We end up using the wrong list, and therefore fails to cleanup properly (leaking oc refs). Also add OBJ_CHECK_NOTNULL before FREE_OBJ to ensure that we free the intended object.

Signed-off-by: Asad Sajjad Ahmed asadsa@varnish-software.com

gquintard commented 3 years ago

looks good, merge when you feel like it please.

I guess it's pretty hard to write a VTC for this, right?

asadsa92 commented 3 years ago

Nice, I noticed it as part of running test04.vtc while doing leak check with ASAN. So, it is already covered, but perhaps enable ASAN build in the varnish-modules repo (same as we currently do in the VC repo)?

gquintard commented 3 years ago

enabling ASAN (and possibly others) would be amazing. Would you care either adding it to the circleci configuration, or create an issue so we can track it?

asadsa92 commented 3 years ago

New issue: https://github.com/varnish/varnish-modules/issues/189 I will look into it if I have spare time, but feel free to make a PR on your own.