Bug 1580320 - Check return value of PeerConnectionImpl::GetFingerprint. r=drno a=RyanVM
authorChristian Holler <choller@mozilla.com>
Tue, 08 Oct 2019 17:52:27 +0000
changeset 523924 9dced159051d52395c92fdf1a81cf8c494f3d96b
parent 523923 1769023cd0957cfc59776def2340c38223b86282
child 523925 1bcfb098011f5dbfe5ba30fc3b1df3cf93812729
push id528
push userarchaeopteryx@coole-files.de
push dateFri, 01 Nov 2019 16:51:34 +0000
treeherdermozilla-esr68@4b95348b577e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdrno, RyanVM
bugs1580320
milestone68.3.0
Bug 1580320 - Check return value of PeerConnectionImpl::GetFingerprint. r=drno a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D48509
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
@@ -398,17 +398,18 @@ class PeerConnectionImpl final
   // this method checks to see if we've made a promise to protect media.
   bool PrivacyRequested() const {
     return mPrivacyRequested.isSome() && *mPrivacyRequested;
   }
 
   NS_IMETHODIMP GetFingerprint(char** fingerprint);
   void GetFingerprint(nsAString& fingerprint) {
     char* tmp;
-    GetFingerprint(&tmp);
+    nsresult rv = GetFingerprint(&tmp);
+    NS_ENSURE_SUCCESS_VOID(rv);
     fingerprint.AssignASCII(tmp);
     delete[] tmp;
   }
 
   void GetCurrentLocalDescription(nsAString& aSDP);
   void GetPendingLocalDescription(nsAString& aSDP);
 
   void GetCurrentRemoteDescription(nsAString& aSDP);