diff options
Diffstat (limited to 'ospfclient/ospf_apiclient.c')
| -rw-r--r-- | ospfclient/ospf_apiclient.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ospfclient/ospf_apiclient.c b/ospfclient/ospf_apiclient.c index 5b46059d78..db624ae074 100644 --- a/ospfclient/ospf_apiclient.c +++ b/ospfclient/ospf_apiclient.c @@ -570,10 +570,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 +595,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 */ |
