--- a/jdk/src/share/bin/wildcard.c Wed May 08 18:00:10 2013 +0100
+++ b/jdk/src/share/bin/wildcard.c Tue May 07 13:15:28 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -136,8 +136,10 @@
{
WildcardIterator it = NEW_(WildcardIterator);
HANDLE handle = FindFirstFile(wildcard, &find_data);
- if (handle == INVALID_HANDLE_VALUE)
+ if (handle == INVALID_HANDLE_VALUE) {
+ JLI_MemFree(it);
return NULL;
+ }
it->handle = handle;
it->firstFile = find_data.cFileName;
return it;