diff options
author | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-07-19 11:56:00 -0700 |
---|---|---|
committer | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-07-19 11:56:00 -0700 |
commit | 3bb31876e797c7a13b4ffb7d67a5d710cbf4fab3 (patch) | |
tree | 8888abf5bfb3b666027746c78a7466e09fa3a557 /keygen | |
parent | c64b1544752547cede30647bb03ab1bbbc06d079 (diff) | |
download | xrdp-proprietary-3bb31876e797c7a13b4ffb7d67a5d710cbf4fab3.tar.gz xrdp-proprietary-3bb31876e797c7a13b4ffb7d67a5d710cbf4fab3.zip |
coverity: fixed resolution leak issues
Diffstat (limited to 'keygen')
-rw-r--r-- | keygen/keygen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/keygen/keygen.c b/keygen/keygen.c index bd47f73a..0cd1427d 100644 --- a/keygen/keygen.c +++ b/keygen/keygen.c @@ -217,7 +217,7 @@ sign_key(char *e_data, int e_len, char *n_data, int n_len, { return 1; } - + if (n_len == 64) { key = (char *)g_malloc(184, 0); @@ -367,11 +367,12 @@ save_all(char *e_data, int e_len, char *n_data, int n_len, fd = g_file_open(filename); - if (fd > 0) + if (fd != -1) { if (g_file_write(fd, "[keys]\n", 7) == -1) { g_writeln("problem writing to %s, maybe no rights", filename); + g_file_close(fd); return 1; } |