diff --git a/.gitignore b/.gitignore
index 7d14416..8214f68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-SOURCES/trousers-0.3.13.tar.gz
+SOURCES/trousers-0.3.14.tar.gz
diff --git a/.trousers.metadata b/.trousers.metadata
index d062918..b677878 100644
--- a/.trousers.metadata
+++ b/.trousers.metadata
@@ -1 +1 @@
-d23f1a3df4febffc4174f5cca7d1c54230477bb2 SOURCES/trousers-0.3.13.tar.gz
+9ca2cc9e1179465f6c5d9055e2b855e25031b85a SOURCES/trousers-0.3.14.tar.gz
diff --git a/SOURCES/unlock-in-err-path.patch b/SOURCES/unlock-in-err-path.patch
new file mode 100644
index 0000000..d49dd6a
--- /dev/null
+++ b/SOURCES/unlock-in-err-path.patch
@@ -0,0 +1,11 @@
+diff -ur a/src/tspi/obj_context.c b/src/tspi/obj_context.c
+--- a/src/tspi/obj_context.c	2014-11-03 12:31:55.000000000 -0700
++++ b/src/tspi/obj_context.c	2017-04-03 12:40:15.055871284 -0700
+@@ -276,6 +276,7 @@
+     context->machineName = (BYTE *)calloc(1, len);
+     if (context->machineName == NULL) {
+         LogError("malloc of %u bytes failed.", len);
++	obj_list_put(&context_list);
+         return TSPERR(TSS_E_OUTOFMEMORY);
+     }
+     memcpy(context->machineName, name, len);
diff --git a/SPECS/trousers.spec b/SPECS/trousers.spec
index 6bdaddb..fa75fb2 100644
--- a/SPECS/trousers.spec
+++ b/SPECS/trousers.spec
@@ -1,7 +1,7 @@
 Name: trousers
 Summary: TCG's Software Stack v1.2
-Version: 0.3.13
-Release: 1%{?dist}
+Version: 0.3.14
+Release: 2%{?dist}
 License: BSD
 Group: System Environment/Libraries
 Url: http://trousers.sourceforge.net
@@ -14,6 +14,8 @@ Requires(pre): shadow-utils
 Requires(post): systemd-units
 Requires(preun): systemd-units
 Requires(postun): systemd-units
+# submitted upstream https://sourceforge.net/p/trousers/mailman/message/35766729/
+Patch0001: unlock-in-err-path.patch
 
 %description
 TrouSerS is an implementation of the Trusted Computing Group's Software Stack
@@ -43,7 +45,8 @@ Header files and man pages for use in creating Trusted Computing enabled
 applications.
 
 %prep
-%setup -q
+%setup -cq
+%patch1 -p1
 
 sed -i -e 's|/var/tpm|/var/lib/tpm|g' -e 's|/usr/local/var|/var|g' man/man5/tcsd.conf.5.in man/man8/tcsd.8.in
 
@@ -108,6 +111,12 @@ exit 0
 %{_libdir}/libtddl.a
 
 %changelog
+* Mon Apr 03 2017 Jerry Snitselaar <jsnitsel@redhat.com> 0.3.14-2
+- release mutex in err path for obj_context_set_machine_name
+
+* Thu Mar 30 2017 Jerry Snitselaar <jsnitsel@redhat.com> 0.3.14-1
+Resolves: rhbz#1384446 Rebase Trousers to latest version
+
 * Sun May 24 2015 Avesh Agarwal <avagarwa@redhat.com> 0.3.13-1
 Resolves: rhbz#1173221 New upstream bug fix release