Explorar el Código

permissions: fix memory leak

- free ruri_pattern from trusted struct in empty_hash_table()
Emmanuel Schmidbauer hace 9 años
padre
commit
93fd86c882
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      modules/permissions/hash.c

+ 1 - 0
modules/permissions/hash.c

@@ -423,6 +423,7 @@ void empty_hash_table(struct trusted_list **table)
 		while (np) {
 			if (np->src_ip.s) shm_free(np->src_ip.s);
 			if (np->pattern) shm_free(np->pattern);
+			if (np->ruri_pattern) shm_free(np->ruri_pattern);
 			if (np->tag.s) shm_free(np->tag.s);
 			next = np->next;
 			shm_free(np);