Fix: Memory leaks on unknown hashtable type error handling
[lttng-tools.git] / src / common / hashtable / hashtable.c
index 30bed07df6b6331cb2dbb18c169a2755a2e0f27b..8c26ebe15b63d3a71f2efd40398e2781e5ddbb59 100644 (file)
@@ -105,6 +105,7 @@ struct lttng_ht *lttng_ht_new(unsigned long size, int type)
                break;
        default:
                ERR("Unknown lttng hashtable type %d", type);
+               lttng_ht_destroy(ht);
                goto error;
        }
 
This page took 0.025013 seconds and 5 git commands to generate.