Browse code

- corrected free function to proper handle the winfo body

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@2386 689a6050-402a-0410-94f2-e92a70836424

Anca Vamanu authored on 02/07/2007 16:03:00
Showing 1 changed files
... ...
@@ -1202,6 +1202,9 @@ done:
1202 1202
 	{
1203 1203
 		if(notify_body->s)
1204 1204
 		{
1205
+			if(event->type & WINFO_TYPE)
1206
+				pkg_free(notify_body->s);
1207
+			else
1205 1208
 			if(event->agg_nbody== NULL && event->apply_auth_nbody== NULL)
1206 1209
 				pkg_free(notify_body->s);
1207 1210
 			else
... ...
@@ -1226,6 +1229,9 @@ error:
1226 1229
 	{
1227 1230
 		if(notify_body->s)
1228 1231
 		{
1232
+			if(event->type & WINFO_TYPE)
1233
+				pkg_free(notify_body->s);
1234
+			else
1229 1235
 			if(event->agg_nbody== NULL && event->apply_auth_nbody== NULL)
1230 1236
 				pkg_free(notify_body->s);
1231 1237
 			else
... ...
@@ -1444,6 +1450,12 @@ jump_over_body:
1444 1450
 		{
1445 1451
 			if(notify_body->s!=NULL)
1446 1452
 			{
1453
+				if(subs->event->type& WINFO_TYPE)
1454
+					xmlFree(notify_body->s);
1455
+				else
1456
+				if(subs->event->apply_auth_nbody== NULL && subs->event->agg_nbody== NULL)
1457
+					pkg_free(notify_body->s);
1458
+				else
1447 1459
 				subs->event->free_body(notify_body->s);
1448 1460
 			}
1449 1461
 			pkg_free(notify_body);
... ...
@@ -1473,7 +1485,15 @@ error:
1473 1485
 		if(notify_body!=NULL)
1474 1486
 		{
1475 1487
 			if(notify_body->s!=NULL)
1488
+			{
1489
+				if(subs->event->type& WINFO_TYPE)
1490
+					xmlFree(notify_body->s);
1491
+				else
1492
+				if(subs->event->apply_auth_nbody== NULL && subs->event->agg_nbody== NULL)
1493
+					pkg_free(notify_body->s);
1494
+				else
1476 1495
 				subs->event->free_body(notify_body->s);
1496
+			}
1477 1497
 			pkg_free(notify_body);
1478 1498
 		}
1479 1499
 	}