batmand: Don't try to schedule_own_packet with no if_incoming

send_outstanding_packets checks if a forw_node has a correct if_incoming.
Otherwise it jumps to packet_free to deallocate the packet infrastructure. But
this also schedules packets with the batman interfaces as target incoming_if.
This is known to be NULL but is dereferenced in schedule_own_packet.

This NULL dereference should be avoided.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
batmand: Don't dereference orig_node before checking for NULL

The update_route functions first stores the orig_node->router in an extra
variable and later checks if orig_node is NULL. This is not only a potential
cause of a crash but can also cause new compilers to drop the NULL check
completely [1].

[1] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fdelete-null-pointer-checks-843

Signed-off-by: Sven Eckelmann <sven@narfation.org>