src/share/bin/wildcard.c

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2005, 2012, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 134,145 **** static WildcardIterator WildcardIterator_for(const char *wildcard) { WildcardIterator it = NEW_(WildcardIterator); HANDLE handle = FindFirstFile(wildcard, &find_data); ! if (handle == INVALID_HANDLE_VALUE) return NULL; it->handle = handle; it->firstFile = find_data.cFileName; return it; } --- 134,147 ---- static WildcardIterator WildcardIterator_for(const char *wildcard) { WildcardIterator it = NEW_(WildcardIterator); HANDLE handle = FindFirstFile(wildcard, &find_data); ! if (handle == INVALID_HANDLE_VALUE) { ! JLI_MemFree(it); return NULL; + } it->handle = handle; it->firstFile = find_data.cFileName; return it; }