Fix stencil buffer memory leak.

Locking stencil buffers with a NULL format resulted in nullptr being
returned without acquiring the resource lock, while unlocking did
release the lock.

Instead of not releasing it on unlock, we must acquire it on lock
because otherwise the object could get destroyed before draw operations
end and attempt to unlock.

Bug b/116876483

Change-Id: Ie883115a1d6df3b40eb7c1feb5dcfde7316ec970
Reviewed-on: https://swiftshader-review.googlesource.com/21148
Reviewed-by: Krzysztof Kosiński <krzysio@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Krzysztof Kosiński <krzysio@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/.travis.yml b/.travis.yml
index 58e4769..25a651f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,11 +23,11 @@
   - make
   - ./unittests
 
-notifications:

-  email:

-    recipients:

-      - swiftshader-team@google.com

-    on_success: never

+notifications:
+  email:
+    recipients:
+      - swiftshader-team@google.com
+    on_success: never
     on_failure: always
 
 deploy: