Fix possible memory leak in _toNewCkmCertList()
Change-Id: I706332a37a48fb720b693b526425c03d2d04e0aa
/*
- * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
ret = ckmc_cert_list_add(plist, pcert, &plist);
if (ret != CKMC_ERROR_NONE) {
+ free(pcert);
ckmc_cert_list_all_free(start);
return nullptr;
}