diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2014-09-15 13:56:18 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2014-09-15 13:56:18 +0000 |
commit | edb29d5a2a04f468d75fc4f92333d33c7f3bdccb (patch) | |
tree | bd00d060a20432abdd9b07a1ddf44b2c9655b90c /pcregrep.c | |
parent | 551fe7c5a4790a42921b292fc943932e5babf630 (diff) | |
download | pcre-edb29d5a2a04f468d75fc4f92333d33c7f3bdccb.tar.gz |
Files tidied for 8.36-RC1.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1502 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcregrep.c')
-rw-r--r-- | pcregrep.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -471,7 +471,7 @@ if (strlen(s) > MAXPATLEN) { fprintf(stderr, "pcregrep: pattern is too long (limit is %d bytes)\n", MAXPATLEN); - free(p); + free(p); return NULL; } p->next = NULL; @@ -2550,11 +2550,11 @@ while (fgets(buffer, PATBUFSIZE, f) != NULL) afterwards, as a precaution against any later code trying to use it. */ *patlastptr = add_pattern(buffer, *patlastptr); - if (*patlastptr == NULL) + if (*patlastptr == NULL) { if (f != stdin) fclose(f); return FALSE; - } + } if (*patptr == NULL) *patptr = *patlastptr; /* This loop is needed because compiling a "pattern" when -F is set may add @@ -2566,10 +2566,10 @@ while (fgets(buffer, PATBUFSIZE, f) != NULL) { if (!compile_pattern(*patlastptr, pcre_options, popts, TRUE, filename, linenumber)) - { + { if (f != stdin) fclose(f); return FALSE; - } + } (*patlastptr)->string = NULL; /* Insurance */ if ((*patlastptr)->next == NULL) break; *patlastptr = (*patlastptr)->next; |