diff options
author | Allen Winter <allen.winter@kdab.com> | 2020-07-21 06:37:37 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2020-07-21 06:37:37 -0400 |
commit | e70adee27430474cd5c288ca8ec2de93ff05fe3e (patch) | |
tree | 0f5394cfabbd8d02a956515bffff218c105bbdca | |
parent | 4debd0cab7a900dcede4f4429ef7e276837be5e4 (diff) | |
download | libical-git-e70adee27430474cd5c288ca8ec2de93ff05fe3e.tar.gz |
src/libical/sspm.c - plug 2 more memory leaks
-rw-r--r-- | src/libical/sspm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libical/sspm.c b/src/libical/sspm.c index e8112fc2..c12ff4fc 100644 --- a/src/libical/sspm.c +++ b/src/libical/sspm.c @@ -522,6 +522,9 @@ static void sspm_build_header(struct sspm_header *header, char *line) if (header->minor == SSPM_UNKNOWN_MINOR_TYPE) { char *p = strchr(val, '/'); + if (header->minor_text != 0) { + free(header->minor_text); + } if (p != 0) { p++; /* Skip the '/' */ @@ -532,6 +535,9 @@ static void sspm_build_header(struct sspm_header *header, char *line) } } if (boundary != 0) { + if (header->boundary != 0) { + free(header->boundary); + } header->boundary = sspm_strdup(boundary); } @@ -863,7 +869,7 @@ static void *sspm_make_multipart_subpart(struct mime_impl *impl, struct sspm_hea sspm_set_error(parent_header, SSPM_NO_BOUNDARY_ERROR, 0); /* read all of the reamining lines */ - while ((line = sspm_get_next_line(impl)) != 0) { + while (sspm_get_next_line(impl) != 0) { } return 0; |