security: fix bug in BasicIdentityStorage::getCertificate: need a new Data object.
diff --git a/ndn-cpp/security/identity/basic-identity-storage.cpp b/ndn-cpp/security/identity/basic-identity-storage.cpp
index 8bf1c1a..cadb59c 100644
--- a/ndn-cpp/security/identity/basic-identity-storage.cpp
+++ b/ndn-cpp/security/identity/basic-identity-storage.cpp
@@ -511,7 +511,7 @@
int res = sqlite3_step(statement);
- shared_ptr<Data> data;
+ shared_ptr<Data> data(new Data());
if (res == SQLITE_ROW)
data->wireDecode((const uint8_t*)sqlite3_column_blob(statement, 0), sqlite3_column_bytes(statement, 0));