mcumgr: smp: Fix NULL pointer reference

SMP implementation across bt/udp does not check
if allocation of the buffer was successful.
If the buffer is not granted an error shall be
returned.

This patch fixes BUS FAULT issue when NULL
pointer is referenced.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
3 files changed