Juan Lang : crypt32: Set last error on alloc failure.

Alexandre Julliard julliard at winehq.org
Fri Nov 2 08:10:27 CDT 2007


Module: wine
Branch: master
Commit: 81a382ac31d8726d0f3d9285dd12db8bc51e78b5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=81a382ac31d8726d0f3d9285dd12db8bc51e78b5

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Nov  1 20:04:36 2007 -0700

crypt32: Set last error on alloc failure.

---

 dlls/crypt32/str.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/crypt32/str.c b/dlls/crypt32/str.c
index 9817b9e..d7d9bb4 100644
--- a/dlls/crypt32/str.c
+++ b/dlls/crypt32/str.c
@@ -749,9 +749,12 @@ static BOOL CRYPT_ValueToRDN(DWORD dwCertEncodingType, PCERT_NAME_INFO info,
             ret = CRYPT_EncodeValue(dwCertEncodingType, value,
              &info->rgRDN[info->cRDN].rgRDNAttr[0].Value, types, ppszError);
         }
-    }
-    if (ret)
+        else
+            SetLastError(ERROR_OUTOFMEMORY);
         info->cRDN++;
+    }
+    else
+        SetLastError(ERROR_OUTOFMEMORY);
     return ret;
 }
 




More information about the wine-cvs mailing list