comparison src/os/unix/ngx_files.c @ 4852:9be0b6b749ae stable-1.2

Merge of r4785, r4795, r4811, r4812, r4816, r4822: coverity. *) Resolver: fixed possible memory leak in ngx_resolver_create(). *) Explicitly ignore returned value from unlink() in ngx_open_tempfile(). *) Explicitly ignore returned value from close() in ngx_event_core_init_conf(). *) Added three missing checks for NULL after ngx_array_push() calls. *) Crypt: fixed handling of corrupted SSHA entries in password file. *) Mark logically dead code with corresponding comment. Found by / prodded by Coverity.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 24 Sep 2012 18:54:28 +0000
parents e2cc3ef93014
children bd6299189b49 2e4e4084b562
comparison
equal deleted inserted replaced
4851:6173853dd782 4852:9be0b6b749ae
137 137
138 fd = open((const char *) name, O_CREAT|O_EXCL|O_RDWR, 138 fd = open((const char *) name, O_CREAT|O_EXCL|O_RDWR,
139 access ? access : 0600); 139 access ? access : 0600);
140 140
141 if (fd != -1 && !persistent) { 141 if (fd != -1 && !persistent) {
142 unlink((const char *) name); 142 (void) unlink((const char *) name);
143 } 143 }
144 144
145 return fd; 145 return fd;
146 } 146 }
147 147