diff --git a/shared/n-dhcp4/src/n-dhcp4-outgoing.c b/shared/n-dhcp4/src/n-dhcp4-outgoing.c index c44b5880aa..9912330886 100644 --- a/shared/n-dhcp4/src/n-dhcp4-outgoing.c +++ b/shared/n-dhcp4/src/n-dhcp4-outgoing.c @@ -54,8 +54,6 @@ int n_dhcp4_outgoing_new(NDhcp4Outgoing **outgoingp, size_t max_size, uint8_t overload) { _c_cleanup_(n_dhcp4_outgoing_freep) NDhcp4Outgoing *outgoing = NULL; - c_assert(!(overload & ~(N_DHCP4_OVERLOAD_FILE | N_DHCP4_OVERLOAD_SNAME))); - /* * Make sure the minimum limit is bigger than the maximum protocol * header plus the DHCP-message-header plus a single OPTION_END byte. @@ -64,6 +62,8 @@ int n_dhcp4_outgoing_new(NDhcp4Outgoing **outgoingp, size_t max_size, uint8_t ov sizeof(NDhcp4Message) + 1, "Invalid minimum IP packet limit"); + c_assert(!(overload & ~(N_DHCP4_OVERLOAD_FILE | N_DHCP4_OVERLOAD_SNAME))); + outgoing = calloc(1, sizeof(*outgoing)); if (!outgoing) return -ENOMEM;