Selaa lähdekoodia

db_flatstore: free result before returning null on no more pkg

- partial allocation when doing an incomplete new connection
Daniel-Constantin Mierla 11 vuotta sitten
vanhempi
commit
74743d6ef3
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      modules/db_flatstore/km_flat_con.c

+ 1 - 0
modules/db_flatstore/km_flat_con.c

@@ -115,6 +115,7 @@ struct flat_con* flat_new_connection(struct flat_id* id)
 	fn = get_name(id);
 	if (fn==0){
 		LM_ERR("get_name() failed\n");
+		pkg_free(res);
 		return 0;
 	}