fix memleak
git-svn-id: file:///raid/svn-personal/tewi/trunk@74 8739d7e6-ffea-ec47-b151-bdff447c6205
This commit is contained in:
parent
47fc157fd2
commit
647f50b9e0
|
@ -345,6 +345,7 @@ void addstring(char** str, const char* add, ...) {
|
||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
va_end(va);
|
||||||
}
|
}
|
||||||
|
|
||||||
char* tw_get_mime(const char* ext, struct tw_config_entry* vhost_entry) {
|
char* tw_get_mime(const char* ext, struct tw_config_entry* vhost_entry) {
|
||||||
|
@ -544,6 +545,7 @@ void tw_server_pass(int sock, bool ssl, int port, SOCKADDR addr) {
|
||||||
char* mime = tw_get_mime(ext, vhost_entry);
|
char* mime = tw_get_mime(ext, vhost_entry);
|
||||||
tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, 0, 0);
|
tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, 0, 0);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
if(ext != NULL) free(ext);
|
||||||
free(p);
|
free(p);
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# $Id$
|
# $Id$
|
||||||
# This is an example config
|
# This is an example config
|
||||||
|
|
||||||
LoadModule /home/nishi/SVN/tewi/trunk/Module/mod_cgi.so
|
#LoadModule /home/nishi/SVN/tewi/trunk/Module/mod_cgi.so
|
||||||
|
|
||||||
Listen 80
|
Listen 80
|
||||||
ListenSSL 443
|
ListenSSL 443
|
||||||
|
@ -31,5 +31,5 @@ BeginDirectory /
|
||||||
EndDirectory
|
EndDirectory
|
||||||
|
|
||||||
BeginDirectory /var/www/cgi-bin
|
BeginDirectory /var/www/cgi-bin
|
||||||
AllowCGI
|
# AllowCGI
|
||||||
EndDirectory
|
EndDirectory
|
||||||
|
|
Loading…
Reference in New Issue
Block a user