[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3123-ge54e42a
Brad King
brad.king at kitware.com
Mon Jul 15 10:24:15 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via e54e42af49c96b71ed69e80c5251ad307192d1d7 (commit)
via a20c819f6380ecef1ff7d03cdbc37d6d2d373ae3 (commit)
via c8adab9e4344a5ef96d902cf11c938d15aff15fc (commit)
via 499531c64e0cd3a6834616af576d612e8678e4d9 (commit)
via 3b849a7ae9051372cbf35c869a367d911e12491e (commit)
from 0971efa6496d6ccaad07134ee6d27bb14b2a90a1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e54e42af49c96b71ed69e80c5251ad307192d1d7
commit e54e42af49c96b71ed69e80c5251ad307192d1d7
Merge: 0971efa a20c819
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 15 10:24:13 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 15 10:24:13 2013 -0400
Merge topic 'cppcheck-fixes' into next
a20c819 cmake: Fix resource leak reported by cppcheck
c8adab9 cmcurl: Fix resource leak reported by cppcheck
499531c libarchive: Fix free() order to avoid accessing freed memory
3b849a7 ccmake: Add missing initializers reported by cppcheck
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a20c819f6380ecef1ff7d03cdbc37d6d2d373ae3
commit a20c819f6380ecef1ff7d03cdbc37d6d2d373ae3
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 15 10:02:34 2013 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 15 10:20:00 2013 -0400
cmake: Fix resource leak reported by cppcheck
Return early in cmake::ReportUndefinedPropertyAccesses if there is no
global generator instead of opening a file and leaking the descriptor.
Reported-by: Ömer Fadıl USTA <omerusta at gmail.com>
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index fcec068..f6e40ba 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3667,11 +3667,11 @@ void cmake::RecordPropertyAccess(const char *name,
void cmake::ReportUndefinedPropertyAccesses(const char *filename)
{
+ if(!this->GlobalGenerator)
+ { return; }
FILE *progFile = fopen(filename,"w");
- if (!progFile || !this->GlobalGenerator)
- {
- return;
- }
+ if(!progFile)
+ { return; }
// what are the enabled languages?
std::vector<std::string> enLangs;
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8adab9e4344a5ef96d902cf11c938d15aff15fc
commit c8adab9e4344a5ef96d902cf11c938d15aff15fc
Author: Ömer Fadıl USTA <omerusta at gmail.com>
AuthorDate: Fri Jul 12 17:23:55 2013 +0300
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 15 10:20:00 2013 -0400
cmcurl: Fix resource leak reported by cppcheck
Add missing fclose calls.
Reviewed-by: Igor Murzov <e-mail at date.by>
diff --git a/Utilities/cmcurl/Testing/sepheaders.c b/Utilities/cmcurl/Testing/sepheaders.c
index 8185787..fc5b783 100644
--- a/Utilities/cmcurl/Testing/sepheaders.c
+++ b/Utilities/cmcurl/Testing/sepheaders.c
@@ -56,6 +56,7 @@ int main(int argc, char **argv)
bodyfile = fopen(bodyfilename,"w");
if (bodyfile == NULL) {
curl_easy_cleanup(curl_handle);
+ fclose(headerfile);
return -1;
}
@@ -70,6 +71,7 @@ int main(int argc, char **argv)
/* close the header file */
fclose(headerfile);
+ fclose(bodyfile);
/* cleanup curl stuff */
curl_easy_cleanup(curl_handle);
diff --git a/Utilities/cmcurl/Testing/simplessl.c b/Utilities/cmcurl/Testing/simplessl.c
index 9a53603..e307eaa 100644
--- a/Utilities/cmcurl/Testing/simplessl.c
+++ b/Utilities/cmcurl/Testing/simplessl.c
@@ -114,5 +114,7 @@ int main(int argc, char **argv)
curl_global_cleanup();
+ if (headerfile)
+ fclose(headerfile);
return 0;
}
diff --git a/Utilities/cmcurl/cookie.c b/Utilities/cmcurl/cookie.c
index 2856ad8..d8ea241 100644
--- a/Utilities/cmcurl/cookie.c
+++ b/Utilities/cmcurl/cookie.c
@@ -969,6 +969,8 @@ int Curl_cookie_output(struct CookieInfo *c, char *dumphere)
format_ptr = get_netscape_format(co);
if (format_ptr == NULL) {
fprintf(out, "#\n# Fatal libcurl error\n");
+ if(!use_stdout)
+ fclose(out);
return 1;
}
fprintf(out, "%s\n", format_ptr);
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=499531c64e0cd3a6834616af576d612e8678e4d9
commit 499531c64e0cd3a6834616af576d612e8678e4d9
Author: Ömer Fadıl USTA <omerusta at gmail.com>
AuthorDate: Fri Jul 12 16:39:34 2013 +0300
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 15 10:20:00 2013 -0400
libarchive: Fix free() order to avoid accessing freed memory
The archive_string_conv type sc variable already freed via free(sc) on
the other hand in second line we are tyring to free its subset via
free(sc->from_charset) this will cause a problem because we couldn't
reach sc after first release.
Reviewed-by: Igor Murzov <e-mail at date.by>
diff --git a/Utilities/cmlibarchive/libarchive/archive_string.c b/Utilities/cmlibarchive/libarchive/archive_string.c
index cbfad2c..370a5fc 100644
--- a/Utilities/cmlibarchive/libarchive/archive_string.c
+++ b/Utilities/cmlibarchive/libarchive/archive_string.c
@@ -1248,8 +1248,8 @@ create_sconv_object(const char *fc, const char *tc,
}
sc->to_charset = strdup(tc);
if (sc->to_charset == NULL) {
- free(sc);
free(sc->from_charset);
+ free(sc);
return (NULL);
}
archive_string_init(&sc->utftmp);
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b849a7ae9051372cbf35c869a367d911e12491e
commit 3b849a7ae9051372cbf35c869a367d911e12491e
Author: Ömer Fadıl USTA <omerusta at gmail.com>
AuthorDate: Fri Jul 12 16:28:51 2013 +0300
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 15 10:20:00 2013 -0400
ccmake: Add missing initializers reported by cppcheck
The return statement uses d1, d2, d3, and d4 variables but the code
which initialize them inside a if statement and not always this if
statement is corrent. On the other hand these variables are using for
return statement and needed to be initialized. A trivial fix to pervent
some compilers will give build error.
Reviewed-by: Igor Murzov <e-mail at date.by>
diff --git a/Source/CursesDialog/form/fty_ipv4.c b/Source/CursesDialog/form/fty_ipv4.c
index 4ac8a50..c855af6 100644
--- a/Source/CursesDialog/form/fty_ipv4.c
+++ b/Source/CursesDialog/form/fty_ipv4.c
@@ -30,7 +30,7 @@ static bool Check_IPV4_Field(FIELD * field, const void * argp)
{
char *bp = field_buffer(field,0);
int num = 0, len;
- unsigned int d1, d2, d3, d4;
+ unsigned int d1=256, d2=256, d3=256, d4=256;
argp=0; /* Silence unused parameter warning. */
-----------------------------------------------------------------------
Summary of changes:
Source/CursesDialog/form/fty_ipv4.c | 2 +-
Source/cmake.cxx | 8 ++++----
Utilities/cmcurl/Testing/sepheaders.c | 2 ++
Utilities/cmcurl/Testing/simplessl.c | 2 ++
Utilities/cmcurl/cookie.c | 2 ++
Utilities/cmlibarchive/libarchive/archive_string.c | 2 +-
6 files changed, 12 insertions(+), 6 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list