tests: Add test suite for packets.h.
[openvswitch] / lib / cfm.c
index 428b1a73dac2718ee623d24f15d9daec74aed587..567dc579e7e0713b5cf9e895ee0d9d97e73da34b 100644 (file)
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -118,9 +118,7 @@ compose_ccm(struct cfm_internal *cfmi)
     struct ofpbuf *packet;
     struct eth_header *eth;
 
-    packet = xzalloc(sizeof *packet);
-
-    ofpbuf_init(packet, ETH_HEADER_LEN + CCM_LEN + 2);
+    packet = ofpbuf_new(ETH_HEADER_LEN + CCM_LEN + 2);
 
     ofpbuf_reserve(packet, 2);