Ejemplo n.º 1
0
int rsa_FREEKEYS(RSA_CTX *ctx,unsigned char **N,unsigned char **d,
unsigned char **e){
int r;
r=Lfree(*N,ctx->bits/8);
if(r<0)
	return r;
Lfree(*d,ctx->bits/8);
if(r<0)
	return r;
Lfree(*e,ctx->bits/8);
if(r<0)
	return r;
return OK;
}
Ejemplo n.º 2
0
/* ARGSUSED */
static int
lwpstop(int *lwpcount, const lwpstatus_t *status, const lwpsinfo_t *info)
{
	struct ps_lwphandle *L;
	int gcode;

	if (proc_lwp_in_set(lwps, info->pr_lwpid)) {
		/*
		 * There is a race between the callback from the iterator and
		 * grabbing of the lwp.  If the lwp has already exited, Lgrab
		 * will return the error code G_NOPROC.  It's not a real error,
		 * only if there is no lwp matching the specification.
		 */
		if ((L = Lgrab(P, info->pr_lwpid, &gcode)) != NULL) {
			(void) Ldstop(L);
			Lfree(L);
			if (*lwpcount >= 0)
				(*lwpcount)++;
		} else if (gcode != G_NOPROC) {
			(void) fprintf(stderr, "%s: cannot control %d/%d: %s\n",
			    command, (int)Pstatus(P)->pr_pid,
			    (int)info->pr_lwpid, Lgrab_error(gcode));
			*lwpcount = -1;
		}
	}
	return (0);
}
Ejemplo n.º 3
0
static int Posix_gc (lua_State *L) {
  TPosix *ud = check_ud (L);
  if (ud->freed == 0) {           /* precaution against "manual" __gc calling */
    ud->freed = 1;
    regfree (&ud->r);
    Lfree (L, ud->match, (ALG_NSUB(ud) + 1) * sizeof (regmatch_t));
  }
  return 0;
}
Ejemplo n.º 4
0
void free(char *s) { Lfree(s); }