do not call xmlSecKeyDuplicate is source key is NULL

This commit is contained in:
Benjamin Dauvergne 2016-04-26 14:43:43 +02:00
parent f673208a62
commit a71e682905
1 changed files with 4 additions and 1 deletions

View File

@ -335,7 +335,10 @@
#define lasso_assign_sec_key(dest, src) \
{ \
xmlSecKey *__tmp = xmlSecKeyDuplicate(src); \
xmlSecKey *__tmp = NULL; \
if (src) {\
__tmp = xmlSecKeyDuplicate(src); \
} \
if (dest) \
lasso_release_sec_key(dest); \
dest = __tmp; \