diff options
author | Lev Walkin <vlm@lionet.info> | 2005-10-06 10:09:34 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2005-10-06 10:09:34 +0000 |
commit | a895afba67a27db3caf3ac3b772ba1696b161afd (patch) | |
tree | e492a63b066ad3d2c3c73d60e37b2729e7109a2c /libasn1compiler/asn1c_compat.c | |
parent | c0e7071cd4e790bf75beda27ef07f8cb4ab4919d (diff) |
-fskeletons-copy
Diffstat (limited to 'libasn1compiler/asn1c_compat.c')
-rw-r--r-- | libasn1compiler/asn1c_compat.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libasn1compiler/asn1c_compat.c b/libasn1compiler/asn1c_compat.c index 2a80251a..b393d6d2 100644 --- a/libasn1compiler/asn1c_compat.c +++ b/libasn1compiler/asn1c_compat.c @@ -80,12 +80,19 @@ asn1c_open_file(const char *name, const char *ext, char **opt_tmpname) { if(fp == NULL) { if(created) unlink(fname); close(fd); + return NULL; } /* Return the temporary file name */ if(opt_tmpname) { *opt_tmpname = strdup(fname); - assert(*opt_tmpname); + if(*opt_tmpname) { + /* Successfull */ + } else { + if(created) unlink(fname); + fclose(fp); + return NULL; + } } return fp; |