[COVERITY][SPOOLSS] Fix a resource leak
[reactos.git] / win32ss / printing / base / spoolss / main.c
index c7b3f63..985ac15 100644 (file)
@@ -227,8 +227,13 @@ SplInitializeWinSpoolDrv(PVOID* pTable)
 
     // Verify that all calls succeeded.
     for (i = 0; i < 9; i++)
+    {
         if (!pTable[i])
+        {
+            FreeLibrary(hWinspool);
             return FALSE;
+        }
+    }
 
     return TRUE;
 }