nm: Do not free unexistant device

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>