Browse code

Merge pull request #2712 from mancasg/patch-1

domain: fix use after free on domain reload

Olle E. Johansson authored on 19/04/2021 06:20:20 • GitHub committed on 19/04/2021 06:20:20
Showing 1 changed files
... ...
@@ -204,8 +204,9 @@ void hash_table_free(struct domain_list **hash_table)
204 204
 			shm_free(ap);
205 205
 			ap = next_ap;
206 206
 		}
207
+		next = np->next;
207 208
 		shm_free(np);
208
-		np = np->next;
209
+		np = next;
209 210
 	}
210 211
 
211 212
 	hash_table[DOM_HASH_SIZE] = NULL;