Index: webrtc/sdk/android/src/jni/peerconnection_jni.cc |
diff --git a/webrtc/sdk/android/src/jni/peerconnection_jni.cc b/webrtc/sdk/android/src/jni/peerconnection_jni.cc |
index c07d58faffc6210116057b02cf9d52f3a9432ea8..708e65db46d400fdd9dc32cd8fc2b9bb0659576c 100644 |
--- a/webrtc/sdk/android/src/jni/peerconnection_jni.cc |
+++ b/webrtc/sdk/android/src/jni/peerconnection_jni.cc |
@@ -658,6 +658,9 @@ class SdpObserverWrapper : public T { |
jobject j_sdp = JavaSdpFromNativeSdp(jni(), desc); |
jni()->CallVoidMethod(*j_observer_global_, m, j_sdp); |
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; |
+ // OnSuccess transfers ownership of the description (there's a TODO to make |
+ // it use unique_ptr...). |
+ delete desc; |
} |
protected: |