Projet

Général

Profil

« Précédent | Suivant » 

Révision 841c2b6e

Ajouté par Ermal il y a presque 10 ans

Make sure to pass the right information and properly cleanup on errors

Voir les différences:

pfPorts/php55-pfSense-module/files/pfSense.c
772 772
	} else if (!inet_pton(AF_INET, ip, &xent->k.addr6)) {
773 773
		efree(op3);
774 774
		RETURN_FALSE;
775
	} else {
776
		efree(op3);
777
		RETURN_FALSE;
775 778
	}
776 779

  
780
	if (!strchr(ip, ':'))
781
		xent->flags = IPFW_TCF_INET;
782

  
777 783
	if (mask)
778 784
		xent->masklen = (u_int8_t)mask;
779 785
	else
......
881 887
	xent->tbl = (u_int16_t)table;
882 888

  
883 889
	if (strchr(ip, ':')) {
884
		if (!inet_pton(AF_INET6, ip, &xent->k.addr6))
890
		if (!inet_pton(AF_INET6, ip, &xent->k.addr6)) {
891
			efree(op3);
885 892
			RETURN_FALSE;
893
		}
886 894
	} else if (!inet_pton(AF_INET, ip, &xent->k.addr6)) {
895
		efree(op3);
896
		RETURN_FALSE;
897
	} else {
898
		efree(op3);
887 899
		RETURN_FALSE;
888 900
	}
889 901

  
902
	if (!strchr(ip, ':'))
903
		xent->flags = IPFW_TCF_INET;
904

  
890 905
	if (mask)
891 906
		xent->masklen = (u_int8_t)mask;
892 907
	else

Formats disponibles : Unified diff