From a71e682905d9a429d43d514fa1f169ebba6bec19 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 26 Apr 2016 14:43:43 +0200 Subject: [PATCH] do not call xmlSecKeyDuplicate is source key is NULL --- lasso/utils.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lasso/utils.h b/lasso/utils.h index 30957a91..6128c9a3 100644 --- a/lasso/utils.h +++ b/lasso/utils.h @@ -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; \