Manage memory correctly in NssUtilTest.FindFromPublicKey

I wasn't doing the right thing with the return value of
GetPrivateKeyForUser(), so now I stuff it in a scoped_ptr.

BUG=chromium:378835
TEST=unit
STATUS=Fixed

Change-Id: I909a4a9cc5881db6bffaf190026f17f7c6396e86
Reviewed-on: https://chromium-review.googlesource.com/202150
Commit-Queue: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
diff --git a/nss_util_unittest.cc b/nss_util_unittest.cc
index 692c9c8..e6f067b 100644
--- a/nss_util_unittest.cc
+++ b/nss_util_unittest.cc
@@ -50,8 +50,9 @@
 
   EXPECT_TRUE(util_->CheckPublicKeyBlob(public_key));
 
-  EXPECT_NE(util_->GetPrivateKeyForUser(public_key, slot_.get()),
-            reinterpret_cast<RSAPrivateKey*>(NULL));
+  scoped_ptr<RSAPrivateKey> private_key(
+      util_->GetPrivateKeyForUser(public_key, slot_.get()));
+  EXPECT_NE(private_key.get(), reinterpret_cast<RSAPrivateKey*>(NULL));
 }
 
 TEST_F(NssUtilTest, RejectBadPublicKey) {