mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
fixed potential crash
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1459 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
6d4f2ab6fa
commit
de3116ef54
@ -61,10 +61,12 @@ static int flood_hash_check_remove(const char *key, FLOOD_REC *flood,
|
|||||||
next = tmp->next;
|
next = tmp->next;
|
||||||
/* remove old time entries for current rec item */
|
/* remove old time entries for current rec item */
|
||||||
for (times = rec->msgtimes; times != NULL; times = tnext) {
|
for (times = rec->msgtimes; times != NULL; times = tnext) {
|
||||||
|
time_t *data = times->data;
|
||||||
tnext = times->next;
|
tnext = times->next;
|
||||||
|
|
||||||
if (*now-*((time_t *) times->data) >= flood_timecheck) {
|
if (*now-*((time_t *) times->data) >= flood_timecheck) {
|
||||||
rec->msgtimes = g_slist_remove(rec->msgtimes, times->data);
|
rec->msgtimes = g_slist_remove(rec->msgtimes, data);
|
||||||
g_free(times->data);
|
g_free(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* if no more time entries remove rec item */
|
/* if no more time entries remove rec item */
|
||||||
|
Loading…
Reference in New Issue
Block a user