Mercurial > noffle
comparison src/pseudo.c @ 240:fbff73fe5b40 noffle
[svn] * src/client.c: That wasn't a memory leak fixed on Feb 8th. That was a
cockup cause by my forgetting that Cont_app takes ownership of an
overview. Revert it and add comment to Cont_app. Spotted with the aid
of valgrind.
* src/post.c,src/pseudo.c
* src/util.c: Fix out of bounds write bug spotted by valgrind.
* src/database.c: Fix minor memory leak spotted by valgrind.
Valgrind is at http://devel-home.kde.org/~sewardj/.
author | bears |
---|---|
date | Tue, 26 Feb 2002 17:13:31 +0000 |
parents | ffb1848a39db |
children | 3477050e8d10 |
comparison
equal
deleted
inserted
replaced
239:2b7ddb90d9b2 | 240:fbff73fe5b40 |
---|---|
1 /* | 1 /* |
2 pseudo.c | 2 pseudo.c |
3 | 3 |
4 $Id: pseudo.c 342 2001-12-09 12:31:57Z bears $ | 4 $Id: pseudo.c 371 2002-02-26 17:13:31Z bears $ |
5 */ | 5 */ |
6 | 6 |
7 #if HAVE_CONFIG_H | 7 #if HAVE_CONFIG_H |
8 #include <config.h> | 8 #include <config.h> |
9 #endif | 9 #endif |
201 DynStr_appLn( artTxt, "" ); | 201 DynStr_appLn( artTxt, "" ); |
202 DynStr_appDynStr( artTxt, body ); | 202 DynStr_appDynStr( artTxt, body ); |
203 ov = genOv( rawSubj, DynStr_str( body ), "PSEUDO" ); | 203 ov = genOv( rawSubj, DynStr_str( body ), "PSEUDO" ); |
204 if ( body && artTxt && ov ) | 204 if ( body && artTxt && ov ) |
205 { | 205 { |
206 Cont_app( ov ); | 206 Cont_app( ov ); /* Cont modules owns ov after this */ |
207 if ( Db_prepareEntry( ov, Cont_grp(), Cont_last() ) ) | 207 if ( Db_prepareEntry( ov, Cont_grp(), Cont_last() ) ) |
208 Db_storeArt( Ov_msgId( ov ), DynStr_str( artTxt ) ); | 208 Db_storeArt( Ov_msgId( ov ), DynStr_str( artTxt ) ); |
209 if ( Cont_write() ) | 209 if ( Cont_write() ) |
210 Grp_setFirstLast( Cont_grp(), Cont_first(), Cont_last() ); | 210 Grp_setFirstLast( Cont_grp(), Cont_first(), Cont_last() ); |
211 } | 211 } |