]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfclient/ospf_apiclient.c
zebra: Refactor kernel_rtm to be a bit smarter about how it handles options
[mirror_frr.git] / ospfclient / ospf_apiclient.c
index 5b46059d7835d14868bc6e2a8e38d4d0d4a7fead..50485cc7e25c334de1a40787e945d3809c8b13c0 100644 (file)
@@ -46,6 +46,7 @@
 #include "ospfd/ospf_lsdb.h"
 #include "ospfd/ospf_neighbor.h"
 #include "ospfd/ospf_dump.h"
+#include "ospfd/ospf_route.h"
 #include "ospfd/ospf_zebra.h"
 #include "ospfd/ospf_api.h"
 
@@ -570,10 +571,7 @@ static void ospf_apiclient_handle_lsa_update(struct ospf_apiclient *oclient,
        /* Extract LSA from message */
        lsalen = ntohs(cn->data.length);
        lsa = XMALLOC(MTYPE_OSPF_APICLIENT, lsalen);
-       if (!lsa) {
-               fprintf(stderr, "LSA update: Cannot allocate memory for LSA\n");
-               return;
-       }
+
        memcpy(lsa, &(cn->data), lsalen);
 
        /* Invoke registered update callback function */
@@ -598,10 +596,7 @@ static void ospf_apiclient_handle_lsa_delete(struct ospf_apiclient *oclient,
        /* Extract LSA from message */
        lsalen = ntohs(cn->data.length);
        lsa = XMALLOC(MTYPE_OSPF_APICLIENT, lsalen);
-       if (!lsa) {
-               fprintf(stderr, "LSA delete: Cannot allocate memory for LSA\n");
-               return;
-       }
+
        memcpy(lsa, &(cn->data), lsalen);
 
        /* Invoke registered update callback function */