[PATCH] don't try to clean unset P11_SESSION_IN_USE
fixes abort() From: Guido Günther. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23857 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (c) 2004 - 2006 Kungliga Tekniska Högskolan
 | 
					 * Copyright (c) 2004 - 2008 Kungliga Tekniska Högskolan
 | 
				
			||||||
 * (Royal Institute of Technology, Stockholm, Sweden).
 | 
					 * (Royal Institute of Technology, Stockholm, Sweden).
 | 
				
			||||||
 * All rights reserved.
 | 
					 * All rights reserved.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@@ -454,7 +454,6 @@ p11_get_session(hx509_context context,
 | 
				
			|||||||
				       "Failed to login on slot id %d "
 | 
									       "Failed to login on slot id %d "
 | 
				
			||||||
				       "with error: 0x%08x",
 | 
									       "with error: 0x%08x",
 | 
				
			||||||
				       (int)slot->id, ret);
 | 
									       (int)slot->id, ret);
 | 
				
			||||||
	    p11_put_session(p, slot, slot->session);
 | 
					 | 
				
			||||||
	    return HX509_PKCS11_LOGIN;
 | 
						    return HX509_PKCS11_LOGIN;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (slot->pin == NULL) {
 | 
						if (slot->pin == NULL) {
 | 
				
			||||||
@@ -463,7 +462,6 @@ p11_get_session(hx509_context context,
 | 
				
			|||||||
		if (context)
 | 
							if (context)
 | 
				
			||||||
		    hx509_set_error_string(context, 0, ENOMEM,
 | 
							    hx509_set_error_string(context, 0, ENOMEM,
 | 
				
			||||||
					   "out of memory");
 | 
										   "out of memory");
 | 
				
			||||||
		p11_put_session(p, slot, slot->session);
 | 
					 | 
				
			||||||
		return ENOMEM;
 | 
							return ENOMEM;
 | 
				
			||||||
	    }
 | 
						    }
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user