summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorol.beketov <ol.beketov@samsung.com>2017-05-04 16:59:56 +0300
committerRandeep Singh <randeep.s@samsung.com>2017-05-23 08:27:05 +0000
commite967aab904707d882257dd0674cb5232dec44cdc (patch)
tree4ca69a447503110a2a0d221e225d39df2a64355f
parent2eca3ad480b0628eb7ba44e070d222fed49bf469 (diff)
downloadiotivity-e967aab904707d882257dd0674cb5232dec44cdc.tar.gz
iotivity-e967aab904707d882257dd0674cb5232dec44cdc.tar.bz2
iotivity-e967aab904707d882257dd0674cb5232dec44cdc.zip
[IOT-2113] Change the logic not to delete double time
Change-Id: I56923e53e9b81da45b9ff9e50e7df9cdde233c25 Signed-off-by: ol.beketov <ol.beketov@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/19631 Tested-by: jenkins-iotivity <jenkins@iotivity.org> Reviewed-by: Uze Choi <uzchoi@samsung.com> Reviewed-by: Randeep Singh <randeep.s@samsung.com>
-rw-r--r--service/notification/android/notification-service/src/main/jni/consumer/JniNotificationConsumer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/service/notification/android/notification-service/src/main/jni/consumer/JniNotificationConsumer.cpp b/service/notification/android/notification-service/src/main/jni/consumer/JniNotificationConsumer.cpp
index 5ec78e934..0d16c3db4 100644
--- a/service/notification/android/notification-service/src/main/jni/consumer/JniNotificationConsumer.cpp
+++ b/service/notification/android/notification-service/src/main/jni/consumer/JniNotificationConsumer.cpp
@@ -624,7 +624,6 @@ jobject getJavaMessage(JNIEnv *env, OIC::Service::NSMessage message)
{
NS_LOGE ("Failed to create OcRepresentation");
delete ocRepresentation;
- return NULL;
}
else
{
@@ -635,7 +634,10 @@ jobject getJavaMessage(JNIEnv *env, OIC::Service::NSMessage message)
if (!fid_extraInfo)
{
NS_LOGE ("Failed to get mExtraInfo for Message");
- delete ocRepresentation;
+ if (ocRepresentation)
+ {
+ delete ocRepresentation;
+ }
return NULL;
}
NS_LOGD ("setting extraInfo field");