Fix possible memory leak.
@@ -314,8 +314,15 @@ int yr_object_from_external_variable(
break;
}
+ if (result == ERROR_SUCCESS)
+ {
*object = obj;
}
+ else
+ {
+ yr_object_destroy(obj);
+ }
+ }
return result;
}
