1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00
profanity/src
Steffen Jaeckel 12d76e4a21 Fix memleaks & more auto-free
`data_dir` would have been leaked if directory creation failed.

`editor_argv` was leaked at some point, no idea why.

```
==1244734== 118 (32 direct, 86 indirect) bytes in 1 blocks are definitely lost in loss record 6,299 of 7,824
==1244734==    at 0x4846CC3: realloc (vg_replace_malloc.c:1451)
==1244734==    by 0x5E85AD0: g_realloc (in /usr/lib/libglib-2.0.so.0.7600.1)
==1244734==    by 0x5E4A004: ??? (in /usr/lib/libglib-2.0.so.0.7600.1)
==1244734==    by 0x5E4A7B1: g_ptr_array_add (in /usr/lib/libglib-2.0.so.0.7600.1)
==1244734==    by 0x5EA4235: g_strsplit (in /usr/lib/libglib-2.0.so.0.7600.1)
==1244734==    by 0x1F143C: get_message_from_editor (editor.c:92)
==1244734==    by 0x193F6B: _inp_rl_send_to_editor (inputwin.c:950)
==1244734==    by 0x614642F: _rl_dispatch_subseq (readline.c:916)
==1244734==    by 0x6146C85: _rl_dispatch_callback (readline.c:823)
==1244734==    by 0x616739F: rl_callback_read_char (callback.c:241)
==1244734==    by 0x1923DB: inp_readline (inputwin.c:188)
==1244734==    by 0x149860: prof_run (profanity.c:117)
==1244734==    by 0x2283E8: main (main.c:186)
```

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-05-12 08:39:20 +02:00
..
command Merge branch 'master' into cleanup/gchar-char 2023-05-11 08:45:46 +02:00
config Merge branch 'master' into cleanup/gchar-char 2023-05-11 08:45:46 +02:00
event Merge branch 'master' into cleanup/gchar-char 2023-05-11 08:45:46 +02:00
omemo Cleanup: gchar as gchar instead of char 2023-05-04 16:15:09 +02:00
otr User proper ellipsis char 2023-04-09 12:19:18 +02:00
pgp Cleanup p_ox_gpg_decrypt 2023-04-13 17:17:25 +02:00
plugins Cleanup: gchar as gchar instead of char 2023-05-04 16:15:09 +02:00
tools Fix memleaks & more auto-free 2023-05-12 08:39:20 +02:00
ui Improve const-correctness of API 2023-05-12 08:39:19 +02:00
xmpp Fix potential double-free 2023-05-12 08:39:16 +02:00
chatlog.c Cleanup: gchar as gchar instead of char 2023-05-04 16:15:09 +02:00
chatlog.h Split log.c into log.c and chatlog.c 2022-06-28 20:08:38 +02:00
common.c Cleanup: gchar as gchar instead of char 2023-05-04 16:15:09 +02:00
common.h Remove space to match clang coding style 2023-01-26 17:43:04 +01:00
database.c Improve const-correctness of API 2023-05-12 08:39:19 +02:00
database.h Improve const-correctness of API 2023-05-12 08:39:19 +02:00
log.c Fix typos and update codespell configuration 2023-04-03 13:25:25 +01:00
log.h minor changes 2023-01-18 20:02:46 +01:00
main.c Cleanup: gchar as gchar instead of char 2023-05-04 16:15:09 +02:00
profanity.c Cleanup: gchar as gchar instead of char 2023-05-04 16:15:09 +02:00
profanity.h Update copyright year 2023-01-10 10:37:25 +01:00