Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
edba1f4d
Commit
edba1f4d
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #6893: fixes segfault in client on clean history
Caused by double free.
parent
26db78d8
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
gnome/src/callable_obj.c
+1
-1
1 addition, 1 deletion
gnome/src/callable_obj.c
gnome/src/contacts/calllist.c
+30
-33
30 additions, 33 deletions
gnome/src/contacts/calllist.c
with
31 additions
and
34 deletions
gnome/src/callable_obj.c
+
1
−
1
View file @
edba1f4d
This diff is collapsed.
Click to expand it.
gnome/src/contacts/calllist.c
+
30
−
33
View file @
edba1f4d
...
@@ -90,7 +90,7 @@ calllist_free_element(gpointer data, gpointer user_data UNUSED)
...
@@ -90,7 +90,7 @@ calllist_free_element(gpointer data, gpointer user_data UNUSED)
free_conference_obj_t
(
element
->
elem
.
conf
);
free_conference_obj_t
(
element
->
elem
.
conf
);
else
/* HIST_CALL */
else
/* HIST_CALL */
free_callable_obj_t
(
element
->
elem
.
call
);
free_callable_obj_t
(
element
->
elem
.
call
);
free
(
element
);
g_
free
(
element
);
}
}
void
void
...
@@ -110,7 +110,7 @@ calllist_reset (calltab_t* tab)
...
@@ -110,7 +110,7 @@ calllist_reset (calltab_t* tab)
void
calllist_add_history_call
(
callable_obj_t
*
obj
)
void
calllist_add_history_call
(
callable_obj_t
*
obj
)
{
{
if
(
eel_gconf_get_integer
(
HISTORY_ENABLED
))
{
if
(
eel_gconf_get_integer
(
HISTORY_ENABLED
))
{
QueueElement
*
element
=
malloc
(
sizeof
(
QueueElement
)
);
QueueElement
*
element
=
g_new0
(
QueueElement
,
1
);
element
->
type
=
HIST_CALL
;
element
->
type
=
HIST_CALL
;
element
->
elem
.
call
=
obj
;
element
->
elem
.
call
=
obj
;
g_queue_push_tail
(
history
->
callQueue
,
(
gpointer
)
element
);
g_queue_push_tail
(
history
->
callQueue
,
(
gpointer
)
element
);
...
@@ -121,7 +121,7 @@ void calllist_add_history_call (callable_obj_t *obj)
...
@@ -121,7 +121,7 @@ void calllist_add_history_call (callable_obj_t *obj)
void
calllist_add_history_conference
(
conference_obj_t
*
obj
)
void
calllist_add_history_conference
(
conference_obj_t
*
obj
)
{
{
if
(
eel_gconf_get_integer
(
HISTORY_ENABLED
))
{
if
(
eel_gconf_get_integer
(
HISTORY_ENABLED
))
{
QueueElement
*
element
=
malloc
(
sizeof
(
QueueElement
)
);
QueueElement
*
element
=
g_new0
(
QueueElement
,
1
);
element
->
type
=
HIST_CONFERENCE
;
element
->
type
=
HIST_CONFERENCE
;
element
->
elem
.
conf
=
obj
;
element
->
elem
.
conf
=
obj
;
g_queue_push_tail
(
history
->
callQueue
,
(
gpointer
)
element
);
g_queue_push_tail
(
history
->
callQueue
,
(
gpointer
)
element
);
...
@@ -134,7 +134,7 @@ calllist_add_call (calltab_t* tab, callable_obj_t * c)
...
@@ -134,7 +134,7 @@ calllist_add_call (calltab_t* tab, callable_obj_t * c)
{
{
DEBUG
(
"Calllist: Add Call %s"
,
c
->
_callID
);
DEBUG
(
"Calllist: Add Call %s"
,
c
->
_callID
);
QueueElement
*
element
=
malloc
(
sizeof
(
QueueElement
)
);
QueueElement
*
element
=
g_new0
(
QueueElement
,
1
);
element
->
type
=
HIST_CALL
;
element
->
type
=
HIST_CALL
;
element
->
elem
.
call
=
c
;
element
->
elem
.
call
=
c
;
g_queue_push_tail
(
tab
->
callQueue
,
(
gpointer
)
element
);
g_queue_push_tail
(
tab
->
callQueue
,
(
gpointer
)
element
);
...
@@ -146,14 +146,11 @@ calllist_clean_history (void)
...
@@ -146,14 +146,11 @@ calllist_clean_history (void)
guint
size
=
calllist_get_size
(
history
);
guint
size
=
calllist_get_size
(
history
);
for
(
guint
i
=
0
;
i
<
size
;
i
++
)
{
for
(
guint
i
=
0
;
i
<
size
;
i
++
)
{
QueueElement
*
c
=
calllist_get_nth
(
history
,
i
);
QueueElement
*
c
=
calllist_get_nth
(
history
,
i
);
if
(
c
->
type
==
HIST_CALL
)
{
if
(
c
->
type
==
HIST_CALL
)
calltree_remove_call
(
history
,
c
->
elem
.
call
,
NULL
);
calltree_remove_call
(
history
,
c
->
elem
.
call
,
NULL
);
}
else
if
(
c
->
type
==
HIST_CONFERENCE
)
else
if
(
c
->
type
==
HIST_CONFERENCE
)
{
calltree_remove_conference
(
history
,
c
->
elem
.
conf
,
NULL
);
calltree_remove_conference
(
history
,
c
->
elem
.
conf
,
NULL
);
}
}
free
(
c
);
}
calllist_reset
(
history
);
calllist_reset
(
history
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment