diff options
| author | Quentin Young <qlyoung@users.noreply.github.com> | 2018-08-13 14:56:56 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-13 14:56:56 -0400 |
| commit | cd22c8ca74597aa27cb11dd28b613d53c0a36abe (patch) | |
| tree | 3e51217c34b49df896e84bf63f80d65a5c5a270d /ospfclient/ospf_apiclient.c | |
| parent | 5487152318c7f56867a027f7214c849f6fb23e5c (diff) | |
| parent | e8c8f2e064c674d1c0935aaf04091c97e117c62f (diff) | |
Merge pull request #2820 from opensourcerouting/err-prep
remove alloc return value checks + minor babeld cleanup
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 */ |
