aboutsummaryrefslogtreecommitdiff
path: root/doc/libNX_X11/lcUniConv
diff options
context:
space:
mode:
authorMario Trangoni <mjtrangoni@gmail.com>2018-03-25 16:13:10 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-07-03 16:40:06 +0200
commit913fcf1a74426725f14380dd5b34286a21c37ab7 (patch)
tree70892161161325931ae5f1b444b277a4d9f0379d /doc/libNX_X11/lcUniConv
parentc58cbc26cc2a04fa06d22333ffe7ad52f7ede1fa (diff)
downloadnx-libs-913fcf1a74426725f14380dd5b34286a21c37ab7.tar.gz
nx-libs-913fcf1a74426725f14380dd5b34286a21c37ab7.tar.bz2
nx-libs-913fcf1a74426725f14380dd5b34286a21c37ab7.zip
Fix some memory leaks.
Diffstat (limited to 'doc/libNX_X11/lcUniConv')
-rw-r--r--doc/libNX_X11/lcUniConv/8bit_tab_to_h.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/libNX_X11/lcUniConv/8bit_tab_to_h.c b/doc/libNX_X11/lcUniConv/8bit_tab_to_h.c
index 993979aeb..469ec05bb 100644
--- a/doc/libNX_X11/lcUniConv/8bit_tab_to_h.c
+++ b/doc/libNX_X11/lcUniConv/8bit_tab_to_h.c
@@ -121,9 +121,15 @@ int main (int argc, char *argv[])
{
char* fname = malloc(strlen(directory)+strlen(filename)+1);
+ if (fname == NULL)
+ {
+ printf("malloc failed\n");
+ exit(1);
+ }
strcpy(fname,directory); strcat(fname,filename);
f = fopen(fname,"w");
if (f == NULL)
+ free(fname);
exit(1);
}