summaryrefslogtreecommitdiff
path: root/src/plugins/guile
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-04-10 19:31:14 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-04-10 19:31:14 +0200
commite7b2e3cb02e1db02a8c86737e1daf0e3a761cc92 (patch)
tree9ac26a91379cda4142075054a1941a1ea562c163 /src/plugins/guile
parentc3d1c9734b7af385c3dfebfdfef601f6a26b1fc3 (diff)
downloadweechat-e7b2e3cb02e1db02a8c86737e1daf0e3a761cc92.zip
guile: fix memory leak in 7 functions returning allocated strings
Fixed functions: - list_new - list_add - list_search - list_casesearch - list_get - list_next - list_prev
Diffstat (limited to 'src/plugins/guile')
-rw-r--r--src/plugins/guile/weechat-guile-api.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/guile/weechat-guile-api.c b/src/plugins/guile/weechat-guile-api.c
index 8a72e8505..11fbc775e 100644
--- a/src/plugins/guile/weechat-guile-api.c
+++ b/src/plugins/guile/weechat-guile-api.c
@@ -585,7 +585,7 @@ weechat_guile_api_list_new ()
result = API_PTR2STR(weechat_list_new ());
- API_RETURN_STRING(result);
+ API_RETURN_STRING_FREE(result);
}
SCM
@@ -604,7 +604,7 @@ weechat_guile_api_list_add (SCM weelist, SCM data, SCM where, SCM user_data)
API_SCM_TO_STRING(where),
API_STR2PTR(API_SCM_TO_STRING(user_data))));
- API_RETURN_STRING(result);
+ API_RETURN_STRING_FREE(result);
}
SCM
@@ -620,7 +620,7 @@ weechat_guile_api_list_search (SCM weelist, SCM data)
result = API_PTR2STR(weechat_list_search (API_STR2PTR(API_SCM_TO_STRING(weelist)),
API_SCM_TO_STRING(data)));
- API_RETURN_STRING(result);
+ API_RETURN_STRING_FREE(result);
}
SCM
@@ -651,7 +651,7 @@ weechat_guile_api_list_casesearch (SCM weelist, SCM data)
result = API_PTR2STR(weechat_list_casesearch (API_STR2PTR(API_SCM_TO_STRING(weelist)),
API_SCM_TO_STRING(data)));
- API_RETURN_STRING(result);
+ API_RETURN_STRING_FREE(result);
}
SCM
@@ -682,7 +682,7 @@ weechat_guile_api_list_get (SCM weelist, SCM position)
result = API_PTR2STR(weechat_list_get (API_STR2PTR(API_SCM_TO_STRING(weelist)),
scm_to_int (position)));
- API_RETURN_STRING(result);
+ API_RETURN_STRING_FREE(result);
}
SCM
@@ -710,7 +710,7 @@ weechat_guile_api_list_next (SCM item)
result = API_PTR2STR(weechat_list_next (API_STR2PTR(API_SCM_TO_STRING(item))));
- API_RETURN_STRING(result);
+ API_RETURN_STRING_FREE(result);
}
SCM
@@ -725,7 +725,7 @@ weechat_guile_api_list_prev (SCM item)
result = API_PTR2STR(weechat_list_prev (API_STR2PTR(API_SCM_TO_STRING(item))));
- API_RETURN_STRING(result);
+ API_RETURN_STRING_FREE(result);
}
SCM