Fix memory leak

Call netimage_deinitialize to fix 20B memory leak