Projects
Eulaceura:Mainline
libical
_service:obs_scm:icalcomponent.c-fix-a-memleak-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:icalcomponent.c-fix-a-memleak-in-icalcomponent_normalize.patch of Package libical
From 14294634579557fee136128d410211ea53635c5c Mon Sep 17 00:00:00 2001 From: Allen Winter <winter@kde.org> Date: Sun, 2 Jun 2024 11:03:33 -0400 Subject: [PATCH] icalcomponent.c - fix a memleak in icalcomponent_normalize() Fix a memleak introduced in the previous commit. Make sure to return on NULL specified component *before* the pvl_lists are created;. --- src/libical/icalcomponent.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libical/icalcomponent.c b/src/libical/icalcomponent.c index be524767d..9c2db5299 100644 --- a/src/libical/icalcomponent.c +++ b/src/libical/icalcomponent.c @@ -2623,15 +2623,18 @@ static int comp_compare(void *a, void *b) void icalcomponent_normalize(icalcomponent *comp) { - pvl_list sorted_props = pvl_newlist(); - pvl_list sorted_comps = pvl_newlist(); icalproperty *prop; icalcomponent *sub; + pvl_list sorted_props; + pvl_list sorted_comps; icalerror_check_arg(comp != 0, "comp"); if (!comp) return; + sorted_props = pvl_newlist(); + sorted_comps = pvl_newlist(); + /* Normalize properties into sorted list */ while ((prop = pvl_pop(comp->properties)) != 0) { int nparams, remove = 0;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2