diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-01-24 03:54:22 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-01-25 03:10:52 -0600 |
commit | 4b1ab968716a82edfa956999336e5eb7cc8407bc (patch) | |
tree | bc452f97eb69dfa3ca07c014ec31819c86d0550a /sal | |
parent | some more CMYK -> CYMK (diff) | |
download | core-4b1ab968716a82edfa956999336e5eb7cc8407bc.tar.gz core-4b1ab968716a82edfa956999336e5eb7cc8407bc.zip |
coverity#440167 Dereference after null check
Change-Id: I05bb7592600ab157d7a5e9dc6280168519d7b5bd
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/profile.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sal/osl/unx/profile.c b/sal/osl/unx/profile.c index c9aca5e34730..e9c514498770 100644 --- a/sal/osl/unx/profile.c +++ b/sal/osl/unx/profile.c @@ -1501,17 +1501,15 @@ static sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line) pProfile->m_Lines[idx]=0; } } - - if (pProfile->m_Lines == NULL) - { - pProfile->m_NoLines = 0; - pProfile->m_MaxLines = 0; - return (NULL); - } - + } + if (pProfile->m_Lines == NULL) + { + pProfile->m_NoLines = 0; + pProfile->m_MaxLines = 0; + return (NULL); } - if ( pProfile->m_Lines != 0 && pProfile->m_Lines[pProfile->m_NoLines] != 0 ) + if ( pProfile->m_Lines[pProfile->m_NoLines] != 0 ) { free(pProfile->m_Lines[pProfile->m_NoLines]); } |