Fix d2i_X509_AUX.

The logic to reset *pp doesn't actually work if pp is NULL. (It also doesn't
work if *pp is NULL, but that didn't work before either.) Don't bother
resetting it. This is consistent with the template-based i2d functions which do
not appear to leave *pp alone on error.

Will send this upstream.

Change-Id: I9fb5753e5d36fc1d490535720b8aa6116de69a70
Reviewed-on: https://boringssl-review.googlesource.com/7812
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/x509/x_x509.c b/crypto/x509/x_x509.c
index 9d24234..f12140f 100644
--- a/crypto/x509/x_x509.c
+++ b/crypto/x509/x_x509.c
@@ -207,7 +207,6 @@
 int i2d_X509_AUX(X509 *a, unsigned char **pp)
 {
     int length, tmplen;
-    unsigned char *start = *pp;
     length = i2d_X509(a, pp);
     if (length < 0 || a == NULL) {
         return length;
@@ -215,7 +214,6 @@
 
     tmplen = i2d_X509_CERT_AUX(a->aux, pp);
     if (tmplen < 0) {
-        *pp = start;
         return tmplen;
     }
     length += tmplen;