diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/libNX_X11/lcUniConv/8bit_tab_to_h.c | 6 |
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); } |