mirror of https://github.com/FreeRDP/FreeRDP
Fixed memory leaks.
This commit is contained in:
parent
54224d4155
commit
3d108f0bca
|
@ -683,7 +683,12 @@ int makecert_context_output_private_key_file(MAKECERT_CONTEXT* context, char* pa
|
||||||
bio = BIO_new(BIO_s_mem());
|
bio = BIO_new(BIO_s_mem());
|
||||||
|
|
||||||
if (!bio)
|
if (!bio)
|
||||||
|
{
|
||||||
|
free (filename);
|
||||||
|
free(fullpath);
|
||||||
|
fclose(fp);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
status = PEM_write_bio_PrivateKey(bio, context->pkey, NULL, NULL, 0, NULL, NULL);
|
status = PEM_write_bio_PrivateKey(bio, context->pkey, NULL, NULL, 0, NULL, NULL);
|
||||||
|
|
||||||
|
@ -694,7 +699,12 @@ int makecert_context_output_private_key_file(MAKECERT_CONTEXT* context, char* pa
|
||||||
status = BIO_read(bio, x509_str, length);
|
status = BIO_read(bio, x509_str, length);
|
||||||
|
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
|
{
|
||||||
|
free (filename);
|
||||||
|
free(fullpath);
|
||||||
|
fclose(fp);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
offset += status;
|
offset += status;
|
||||||
|
|
||||||
|
@ -712,7 +722,12 @@ int makecert_context_output_private_key_file(MAKECERT_CONTEXT* context, char* pa
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
|
{
|
||||||
|
free (filename);
|
||||||
|
free(fullpath);
|
||||||
|
fclose(fp);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
length = offset;
|
length = offset;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue