Sfoglia il codice sorgente

modules_k/pua: Fixed occasional seg fault in PUA

- This was added by the fix to the race hazards
  (Commit ID: e627bc31776b521a1078b2a004e8ed179521cae2)
- It only happens in certain error situations (which should not occur anyway -
  these are under investigation now) and was found during an over-weekend
  soak test.
- Found and fixed by Paul Pankhurst @ Crocodile RCS
pd 13 anni fa
parent
commit
6d30bd7403
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      modules_k/pua/send_subscribe.c

+ 5 - 2
modules_k/pua/send_subscribe.c

@@ -696,8 +696,11 @@ done:
 	goto end;
 
 error:	
-	if (presentity->remote_contact.s) shm_free(presentity->remote_contact.s);
-	if (presentity) shm_free(presentity);
+        if (presentity)
+	{
+		if (presentity->remote_contact.s) shm_free(presentity->remote_contact.s);
+	 	shm_free(presentity);
+	}
 
 end: