Joachim Bauch fec2c6d7eb Prevent potential double-free if srtp_create fails.
If srtp_create fails while adding streams, it deallocates the session
but doesn't clear the passed pointer which then could lead to a
double-free in the SrtpSession dtor.

The CL also adds locking for libsrtp initialization / shutdown.

BUG=4042
R=jiayl@webrtc.org, juberti@google.com, pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47319004

Cr-Commit-Position: refs/heads/master@{#9300}
2015-05-27 21:41:52 +00:00
..
2015-04-20 12:03:00 +00:00
2015-04-20 12:03:00 +00:00
2015-04-20 12:03:00 +00:00
2015-04-02 10:31:00 +00:00
2015-04-20 12:03:00 +00:00
2014-08-28 16:28:26 +00:00
2015-05-21 11:50:41 +00:00
2015-05-21 11:50:41 +00:00
2015-04-01 22:25:29 +00:00
2015-04-01 22:25:29 +00:00
2015-01-22 23:06:17 +00:00
2015-04-01 15:08:49 +00:00
2015-05-21 11:50:41 +00:00
2015-05-20 18:25:21 +00:00
2015-04-20 12:03:00 +00:00
2015-04-20 12:03:00 +00:00
2015-03-09 22:24:25 +00:00
2015-02-18 18:44:14 +00:00
2015-02-17 19:01:14 +00:00