Updated the free() calls to the safefree() calls.
This commit is contained in:
parent
1ad48fd906
commit
fd61e791b5
@ -1,4 +1,4 @@
|
|||||||
/* $Id: acl.c,v 1.1 2000-09-12 00:08:48 rjkaes Exp $
|
/* $Id: acl.c,v 1.2 2000-09-26 04:57:46 rjkaes Exp $
|
||||||
*
|
*
|
||||||
* This system handles Access Control for use of this daemon. A list of
|
* This system handles Access Control for use of this daemon. A list of
|
||||||
* domains, or IP addresses (including IP blocks) are stored in a list
|
* domains, or IP addresses (including IP blocks) are stored in a list
|
||||||
@ -107,7 +107,7 @@ int insert_acl(char *location, acl_access_t access_type)
|
|||||||
|
|
||||||
new_acl_ptr->netmask = atoi(nptr);
|
new_acl_ptr->netmask = atoi(nptr);
|
||||||
if (new_acl_ptr->netmask < 0 || new_acl_ptr->netmask > 32) {
|
if (new_acl_ptr->netmask < 0 || new_acl_ptr->netmask > 32) {
|
||||||
free(new_acl_ptr);
|
safefree(new_acl_ptr);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -120,7 +120,7 @@ int insert_acl(char *location, acl_access_t access_type)
|
|||||||
|
|
||||||
new_acl_ptr->location = strdup(location);
|
new_acl_ptr->location = strdup(location);
|
||||||
if (!new_acl_ptr->location) {
|
if (!new_acl_ptr->location) {
|
||||||
free(new_acl_ptr);
|
safefree(new_acl_ptr);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: reqs.c,v 1.8 2000-09-12 00:04:42 rjkaes Exp $
|
/* $Id: reqs.c,v 1.9 2000-09-26 04:57:46 rjkaes Exp $
|
||||||
*
|
*
|
||||||
* This is where all the work in tinyproxy is actually done. Incoming
|
* This is where all the work in tinyproxy is actually done. Incoming
|
||||||
* connections have a new thread created for them. The thread then
|
* connections have a new thread created for them. The thread then
|
||||||
@ -279,12 +279,12 @@ static int process_method(struct conn_s *connptr)
|
|||||||
if (safe_write(connptr->server_fd, "Connection: close\r\n", 19) < 0)
|
if (safe_write(connptr->server_fd, "Connection: close\r\n", 19) < 0)
|
||||||
goto COMMON_EXIT;
|
goto COMMON_EXIT;
|
||||||
|
|
||||||
free(request);
|
safefree(request);
|
||||||
free_uri(uri);
|
free_uri(uri);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
COMMON_EXIT:
|
COMMON_EXIT:
|
||||||
free(request);
|
safefree(request);
|
||||||
free_uri(uri);
|
free_uri(uri);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user