aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-07-03 16:41:02 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-07-03 16:41:02 +0200
commit5a8549c6edd0b18fa2315045622bca0f91853796 (patch)
tree4623aec4206d9338e5bcf16a2b71c8898632df80 /doc
parentfd9de0086d10ee236dd24d51d93f60edf52cd89c (diff)
parent5651680bbde34de2713d06e868416145e269cb7c (diff)
downloadnx-libs-5a8549c6edd0b18fa2315045622bca0f91853796.tar.gz
nx-libs-5a8549c6edd0b18fa2315045622bca0f91853796.tar.bz2
nx-libs-5a8549c6edd0b18fa2315045622bca0f91853796.zip
Merge branch 'mjtrangoni-WIP-add-cppcheck' into 3.6.x
Attributes GH PR #678: https://github.com/ArcticaProject/nx-libs/pull/678
Diffstat (limited to 'doc')
-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);
}