diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-02-17 10:14:31 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-02-17 10:14:31 +0000 |
| commit | 6aee19641031f3e2e7c61a761d092e2e3939d665 (patch) | |
| tree | 40bbcf88f3606e4f2414953596cb1fc83899d182 | |
| parent | cef121fa5f01576bfc801a84bfac055fd74b7859 (diff) | |
Core: in utils.h, use a temporary to store reference to freed list
| -rw-r--r-- | lasso/utils.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lasso/utils.h b/lasso/utils.h index c2735593..dc1c8996 100644 --- a/lasso/utils.h +++ b/lasso/utils.h @@ -121,9 +121,10 @@ #define lasso_release_list_of_full(dest, free_function) \ { \ - if (dest) { \ - g_list_foreach(dest, (GFunc)free_function, NULL); \ - lasso_release_list(dest); \ + GList **__tmp = &(dest); \ + if (*__tmp) { \ + g_list_foreach(*__tmp, (GFunc)free_function, NULL); \ + lasso_release_list(*__tmp); \ } \ } |
