diff options
author | monty@mysql.com <> | 2005-02-28 11:59:46 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2005-02-28 11:59:46 +0200 |
commit | 253bfcf7836fd785818128fb18a148f85673f169 (patch) | |
tree | 93113f7a95c643d072853092d2abc4344982b8e9 /mysys/my_init.c | |
parent | 88e1ebd01a77f77b6d6468eaa2d0758bd5dcefad (diff) | |
download | mariadb-git-253bfcf7836fd785818128fb18a148f85673f169.tar.gz |
Fixed wrong memory references found by purify
(No really critical errors found, but a few possible wrong results)
Diffstat (limited to 'mysys/my_init.c')
-rw-r--r-- | mysys/my_init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c index c32fcfe6a09..bee485c3bed 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -145,6 +145,10 @@ void my_end(int infoflag) { #ifdef HAVE_GETRUSAGE struct rusage rus; +#ifdef HAVE_purify + /* Purify assumes that rus is uninitialized after getrusage call */ + bzero((char*) &rus, sizeof(rus)); +#endif if (!getrusage(RUSAGE_SELF, &rus)) fprintf(info_file,"\n\ User time %.2f, System time %.2f\n\ |