Fix handle leak 38/68338/1 accepted/tizen/common/20160504.130218 accepted/tizen/ivi/20160504.012512 accepted/tizen/mobile/20160504.012408 accepted/tizen/tv/20160504.012423 accepted/tizen/wearable/20160504.012454 submit/tizen/20160503.113831
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 3 May 2016 11:40:46 +0000 (20:40 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Tue, 3 May 2016 12:09:37 +0000 (21:09 +0900)
Change-Id: Ic4128016668f77e35657b1fe32817408727596d9

src/backend.c

index a0aa744..332d960 100644 (file)
@@ -82,8 +82,10 @@ load_backend(const struct backend_desc *backend)
       }
 
       init = dlsym(module, entrypoint);
-      if (!init)
+      if (!init) {
+         dlclose(module);
          return NULL;
+      }
    }
 
    return init;