Lines Matching refs:pbuf
100 static u_int8_t *pbuf = NULL; /* sadb_x_policy buffer */ variable
476 if (pbuf) { in init_x_policy()
477 free(pbuf); in init_x_policy()
480 pbuf = malloc(sizeof(struct sadb_x_policy)); in init_x_policy()
481 if (pbuf == NULL) { in init_x_policy()
487 memset(pbuf, 0, tlen); in init_x_policy()
488 p = (struct sadb_x_policy *)pbuf; in init_x_policy()
525 n = realloc(pbuf, tlen);
530 pbuf = n;
532 p = (struct sadb_x_ipsecrequest *)&pbuf[offset];
558 memcpy(&pbuf[offset], addr, sysdep_sa_len(addr));
592 pbuf = NULL;
605 if (pbuf != NULL)
606 free(pbuf);
611 ((struct sadb_x_policy *)pbuf)->sadb_x_policy_len = PFKEY_UNIT64(tlen);
615 return pbuf;