Fixed handles leak upon program exit, by introducing pj_shutdown() and pj_atexit(). Also fixed handle leaks in SIP transaction layer and SIP endpoint.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@815 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip-apps/src/samples/siprtp.c b/pjsip-apps/src/samples/siprtp.c
index 4fc236e..10d796e 100644
--- a/pjsip-apps/src/samples/siprtp.c
+++ b/pjsip-apps/src/samples/siprtp.c
@@ -379,6 +379,10 @@
 	pjsip_endpt_destroy(app.sip_endpt);
 	app.sip_endpt = NULL;
     }
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
 }