diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-25 19:19:43 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-26 08:55:35 +0200 |
commit | 619b40b42ff6474a6cbeb5fe1bdeb306370895f4 (patch) | |
tree | d57c12b56834222a3421f5289e978dd41648e3f0 /src/core | |
parent | 409a06982e2f98914433d2fb26a26af478eb756c (diff) | |
download | weechat-619b40b42ff6474a6cbeb5fe1bdeb306370895f4.zip |
core: remove check of NULL pointers before calling string_shared_free() (issue #865)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core-hdata.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/core-hdata.c b/src/core/core-hdata.c index cd4d28569..ad80ed805 100644 --- a/src/core/core-hdata.c +++ b/src/core/core-hdata.c @@ -1276,8 +1276,7 @@ hdata_set (struct t_hdata *hdata, void *pointer, const char *name, break; case WEECHAT_HDATA_SHARED_STRING: ptr_string = (char **)(pointer + var->offset); - if (*ptr_string) - string_shared_free (*ptr_string); + string_shared_free (*ptr_string); *ptr_string = (value) ? (char *)string_shared_get (value) : NULL; return 1; break; |