Просмотр исходного кода

ncd/interface_modules/interface_badvpn: log error if we can't destory the device

ambrop7 15 лет назад
Родитель
Сommit
2b5d2cdfb0
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      ncd/interface_modules/interface_badvpn.c

+ 3 - 1
ncd/interface_modules/interface_badvpn.c

@@ -178,7 +178,9 @@ static void func_free (void *vo)
     BProcess_Free(&o->process);
     
     // remove TAP device
-    NCDIfConfig_remove_tuntap(o->i->conf->name, 0);
+    if (!NCDIfConfig_remove_tuntap(o->i->conf->name, 0)) {
+        NCDInterfaceModuleInst_Backend_Log(o->i, BLOG_ERROR, "failed to remove TAP device");
+    }
     
     // free instance
     free(o);