Skip to content
Browse files

fixed memory leak

  • Loading branch information...
1 parent d19a54e commit 8d7427a52d4578a69fabe855cb7aec9f575b880e @dinhviethoa dinhviethoa committed Feb 14, 2012
Showing with 1 addition and 8 deletions.
  1. +1 −8 src/low-level/imap/xgmlabels.c
View
9 src/low-level/imap/xgmlabels.c
@@ -81,14 +81,7 @@ struct mailimap_msg_att_xgmlabels * mailimap_msg_att_xgmlabels_new(clist * att_l
void mailimap_msg_att_xgmlabels_free(struct mailimap_msg_att_xgmlabels * att)
{
- clistiter * cur;
-
- for(cur = clist_begin(att->att_labels) ; cur != NULL ; cur = clist_next(cur)) {
- char * label;
-
- label = clist_content(cur);
- free(label);
- }
+ clist_foreach(att->att_labels, (clist_func) mailimap_astring_free, NULL);
clist_free(att->att_labels);
free(att);
}

0 comments on commit 8d7427a

Please sign in to comment.
Something went wrong with that request. Please try again.