printf("%s\n", globerr);
if (gargs) {
blkfree(gargs);
- free((char *)gargs);
+ free(gargs);
}
continue;
}
}
if (gargs != NULL) {
blkfree(gargs);
- free((char *)gargs);
+ free(gargs);
}
}
(void) signal(SIGINT, oldintr);
printf("%s: %s\n", *cpp, globerr);
if (globbed) {
blkfree(globbed);
- free((char *)globbed);
+ free(globbed);
}
return (0);
}
/* don't waste too much memory */
if (*globbed) {
blkfree(globbed1);
- free((char *)globbed);
+ free(globbed);
}
}
return (1);
cmd: USER SP username CRLF
{
user((char *) $3);
- free((char *) $3);
+ free($3);
}
| PASS SP password CRLF
{
pass((char *) $3);
- free((char *) $3);
+ free($3);
}
| PORT SP host_port CRLF
{
if ($2 && $4 != NULL)
retrieve((char *) 0, (char *) $4);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| STOR check_login SP pathname CRLF
{
if ($2 && $4 != NULL)
store_file((char *) $4, "w", 0);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| APPE check_login SP pathname CRLF
{
if ($2 && $4 != NULL)
store_file((char *) $4, "a", 0);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| NLST check_login CRLF
{
if ($2 && $4 != NULL)
send_file_list((char *) $4);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| LIST check_login CRLF
{
if ($2 && $4 != NULL)
retrieve("/bin/ls -lgA %s", (char *) $4);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| STAT check_login SP pathname CRLF
{
if ($2 && $4 != NULL)
statfilecmd((char *) $4);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| STAT CRLF
{
if ($2 && $4 != NULL)
delete_file((char *) $4);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| RNTO SP pathname CRLF
{
} else {
reply(503, "Bad sequence of commands.");
}
- free((char *) $3);
+ free($3);
}
| ABOR CRLF
{
if ($2 && $4 != NULL)
cwd((char *) $4);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| HELP CRLF
{
if ($2 && $4 != NULL)
makedir((char *) $4);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| RMD nonguest SP pathname CRLF
{
if ($2 && $4 != NULL)
removedir((char *) $4);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| PWD check_login CRLF
{
reply(200, "CHMOD command successful.");
}
if ($8 != NULL)
- free((char *) $8);
+ free($8);
}
| SITE SP IDLE CRLF
{
if ($2 && $4 != NULL)
store_file((char *) $4, "w", 1);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| SYST CRLF
{
if ($2 && $4 != NULL)
sizecmd((char *) $4);
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
/*
}
}
if ($4 != NULL)
- free((char *) $4);
+ free($4);
}
| AUTH SP STRING CRLF
{
| ADAT SP STRING CRLF
{
auth_data((char *) $3);
- free((char *) $3);
+ free($3);
}
| QUIT CRLF
{
if ($2 && $4) {
fromname = renamefrom((char *) $4);
if (fromname == (char *) 0 && $4) {
- free((char *) $4);
+ free($4);
}
}
}
$$ = $1;
else {
reply(550, "%s", globerr);
- free((char *) $1);
+ free($1);
}
} else
- free((char *) $1);
+ free($1);
} else
$$ = $1;
}
pfree: for (argc = 1; argv[argc] != NULL; argc++) {
blkfree((char **)argv[argc]);
- free((char *)argv[argc]);
+ free(argv[argc]);
}
return(iop);
}
for (lp = list; lp;) {
retval = krb5_kt_free_entry(context, lp->entry);
- free((char *)lp->entry);
+ free(lp->entry);
if (retval)
break;
prev = lp;
lp = lp->next;
- free((char *)prev);
+ free(prev);
}
return retval;
}
lp->entry = entry;
}
if (entry)
- free((char *)entry);
+ free(entry);
if (retval) {
if (retval == KRB5_KT_END)
retval = 0;
*retdata[i] = **ptr;
if (!(retdata[i]->contents =
(krb5_octet *)malloc(retdata[i]->length))) {
- free((char *)retdata[i]);
+ free(retdata[i]);
retdata[i] = 0;
krb5_free_authdata(kdc_context, retdata);
return ENOMEM;
}
tmpprinc->data = ALLOC (msize, krb5_data);
if (tmpprinc->data == 0) {
- free((char *)tmpprinc);
+ free(tmpprinc);
return KRB5_CC_NOMEM;
}
} else
while(--i >= 0)
free(krb5_princ_component(context, tmpprinc, i)->data);
free(krb5_princ_realm(context, tmpprinc)->data);
- free((char *)tmpprinc->data);
- free((char *)tmpprinc);
+ free(tmpprinc->data);
+ free(tmpprinc);
return kret;
}
}
tmpprinc->data = ALLOC(msize, krb5_data);
if (tmpprinc->data == 0) {
- free((char *) tmpprinc);
+ free(tmpprinc);
return KRB5_CC_NOMEM;
}
} else
while (--i >= 0)
free(krb5_princ_component(context, tmpprinc, i)->data);
free(krb5_princ_realm(context, tmpprinc)->data);
- free((char *) tmpprinc->data);
- free((char *) tmpprinc);
+ free(tmpprinc->data);
+ free(tmpprinc);
return kret;
}
tempprinc->data = malloc(nelems * sizeof(krb5_data));
if (tempprinc->data == 0) {
- free((char *)tempprinc);
+ free(tempprinc);
return ENOMEM;
}
}
principal->data = (krb5_data *) malloc(sizeof(krb5_data) * components);
if (principal->data == NULL) {
- free((char *)principal);
+ free(principal);
return ENOMEM;
}
principal->length = components;
retval = krb5_get_default_realm(context, &default_realm);
if (retval) {
free(principal->data);
- free((char *)principal);
+ free(principal);
return(retval);
}
default_realm_size = strlen(default_realm);
#include "rc-int.h"
#include "k5-thread.h"
-#define FREE(x) ((void) free((char *) (x)))
-
struct krb5_rc_typelist {
const krb5_rc_ops *ops;
struct krb5_rc_typelist *next;
if ((retval = krb5_rc_resolve_type(context, id,
krb5_rc_default_type(context)))) {
- FREE(*id);
+ free(*id);
return retval;
}
if ((retval = krb5_rc_resolve(context, *id,
krb5_rc_default_name(context)))) {
k5_mutex_destroy(&(*id)->lock);
- FREE(*id);
+ free(*id);
return retval;
}
(*id)->magic = KV5M_RCACHE;
type[residual - string_name] = '\0';
if (!(id = (krb5_rcache) malloc(sizeof(*id)))) {
- FREE(type);
+ free(type);
return KRB5_RC_MALLOC;
}
if ((retval = krb5_rc_resolve_type(context, &id,type))) {
- FREE(type);
- FREE(id);
+ free(type);
+ free(id);
return retval;
}
- FREE(type);
+ free(type);
if ((retval = krb5_rc_resolve(context, id,residual + 1))) {
k5_mutex_destroy(&id->lock);
- FREE(id);
+ free(id);
return retval;
}
id->magic = KV5M_RCACHE;
* An implementation for the default replay cache type.
*/
-#define FREE(x) ((void) free((char *) (x)))
-
#include "rc_base.h"
/*
return retval; /* shouldn't happen */
if ((retval = krb5_unparse_name(context, auth->authenticator->client,
&rep->client))) {
- FREE(rep->server);
+ free(rep->server);
return retval; /* shouldn't happen. */
}
return 0;
#error find some way to use net-byte-order file version numbers.
#endif
-#define FREE(x) ((void) free((char *) (x)))
#define UNIQUE getpid() /* hopefully unique number */
#define GETDIR (dir = getdir(), dirlen = strlen(dir) + sizeof(PATH_SEPARATOR) - 1)
if (d->fn) {
if (!do_not_unlink)
(void) unlink(d->fn);
- FREE(d->fn);
+ free(d->fn);
d->fn = NULL;
}
if (d->fd != -1) {
if (d->fn) {
if (!do_not_unlink)
(void) unlink(d->fn);
- FREE(d->fn);
+ free(d->fn);
d->fn = NULL;
}
if (d->fd >= 0)
krb5_rc_io_close(krb5_context context, krb5_rc_iostuff *d)
{
if (d->fn != NULL) {
- FREE(d->fn);
+ free(d->fn);
d->fn = NULL;
}
if (d->fd != -1) {
}
}
- free((char *)pwd_key.contents);
- free((char *)db_key.contents);
+ free(pwd_key.contents);
+ free(db_key.contents);
if (kdbe.key_data[0].key_data_kvno != 1) {
fprintf(stderr,"\tkvno did not match stored value for %s.\n", princ_name);
free(t->rqt_tables);
while(t->info_dirs[0] != (char *)NULL)
ss_delete_info_dir(sci_idx, t->info_dirs[0], &ignored_code);
- free((char *)t->info_dirs);
- free((char *)t);
+ free(t->info_dirs);
+ free(t);
}