Bug 617630
Description
Endi Sukma Dewata
2010-07-23 15:26:38 UTC
Created attachment 434764 [details]
0001-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434765 [details]
0002-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434766 [details]
0003-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434767 [details]
0004-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434768 [details]
0005-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434769 [details]
0006-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434770 [details]
0007-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434771 [details]
0008-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434772 [details]
0009-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434773 [details]
0010-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434774 [details]
0011-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434775 [details]
0012-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434776 [details]
0013-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434777 [details]
0014-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434778 [details]
0015-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434779 [details]
0016-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434780 [details]
0017-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434781 [details]
0018-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434782 [details]
0019-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434783 [details]
0020-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434784 [details]
0021-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Created attachment 434785 [details]
0022-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Comment on attachment 434764 [details] 0001-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12052&streamDefectId=12238&defectInstanceId=14123&fileInstanceId=49539 Comment on attachment 434765 [details] 0002-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12053&streamDefectId=12239&defectInstanceId=14124&fileInstanceId=49541 0002-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch Since Private_Repl_Protocol prp is not initialized with NULL, prp->private is not NULL when jumped to lower from the line 1576 or 1580. 1560 Private_Repl_Protocol *prp = (Private_Repl_Protocol *)slapi_ch_malloc(sizeof(Private_Repl_Protocol)); prp->private should be initialized between the line 1560 and 1576. Otherwise, some garbage address could be passed to this free: + slapi_ch_free((void **)&(*prpp)->private); Comment on attachment 434766 [details] 0003-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12054&streamDefectId=12240&defectInstanceId=14125&fileInstanceId=49543 Comment on attachment 434767 [details] 0004-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12055&streamDefectId=12241&defectInstanceId=14126&fileInstanceId=49546 0004-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch Since Private_Repl_Protocol prp is not initialized with NULL, prp->private is not NULL when jumped to lower from the line 330 or 334. 314 Private_Repl_Protocol *prp = (Private_Repl_Protocol *)slapi_ch_malloc(sizeof(Private_Repl_Protocol)); prp->private should be initialized between the line 314 and 330. Otherwise, some garbage address could be passed to this free: + slapi_ch_free((void **)&(*prpp)->private); Comment on attachment 434767 [details] 0004-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12056&streamDefectId=12242&defectInstanceId=14127&fileInstanceId=49546 This part is good: @@ -244,6 +244,7 @@ done: } prp->stopped = 1; + ruv_destroy(&ruv); LDAPDebug0Args( LDAP_DEBUG_TRACE, "<= windows_tot_run\n" ); } Comment on attachment 434768 [details] 0005-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12057&streamDefectId=12243&defectInstanceId=14128&fileInstanceId=49427 Comment on attachment 434768 [details] 0005-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12058&streamDefectId=12244&defectInstanceId=14129&fileInstanceId=49427 Comment on attachment 434768 [details] 0005-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12059&streamDefectId=12245&defectInstanceId=14130&fileInstanceId=49427 Comment on attachment 434768 [details] 0005-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12060&streamDefectId=12246&defectInstanceId=14131&fileInstanceId=49427 Comment on attachment 434769 [details] 0006-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12061&streamDefectId=12247&defectInstanceId=14132&fileInstanceId=49430 Created attachment 439148 [details] defect id 12062 http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12062&streamDefectId=12248&defectInstanceId=14133&fileInstanceId=49287 Comment: get rid of the unused functions from plugins/shared/{utils.c,plugin_utils.h}. Comment on attachment 439148 [details] defect id 12062 (In reply to comment #34) > Created attachment 439148 [details] > defect id 12062 > > http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12062&streamDefectId=12248&defectInstanceId=14133&fileInstanceId=49287 > > Comment: > get rid of the unused functions from plugins/shared/{utils.c,plugin_utils.h}. Sorry. It was a wrong attachment... Created attachment 439162 [details] coverity 12062 http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12062&streamDefectId=12248&defectInstanceId=14133&fileInstanceId=49287 Comment: coverity 12062 . Getting rid of unused functions from plugins/shared/utils.c. . Moving plugins/shared/{utils.c,plugin-utils.h} to uiduniq. Comment on attachment 434770 [details] 0007-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12064&streamDefectId=12250&defectInstanceId=14135&fileInstanceId=49577 0007-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch Not just these memories, but also other allocated memories in this function should be freed. 745 altany = (char **)slapi_ch_calloc(anysize + 1, sizeof(char *)); 746 oaltany = (char **)slapi_ch_calloc(anysize + 1, sizeof(char *)); diff --git a/ldap/servers/plugins/syntaxes/string.c b/ldap/servers/plugins/syntaxes/string.c index 18e7a05..3ca7416 100644 --- a/ldap/servers/plugins/syntaxes/string.c +++ b/ldap/servers/plugins/syntaxes/string.c @@ -688,11 +688,15 @@ string_assertion2keys_sub( int localsublens[3] = {SUBBEGIN, SUBMIDDLE, SUBEND};/* default values */ int maxsublen; char *comp_buf = NULL; + /* altinit|any|final: store alt string from value_normalize_ext if any, + * otherwise the original string. And used for the real job */ char *altinit = NULL; - char *oaltinit = NULL; char **altany = NULL; - char **oaltany = NULL; char *altfinal = NULL; + /* oaltinit|any|final: prepared to free altinit|any|final if allocated in + * value_normalize_ext */ + char *oaltinit = NULL; + char **oaltany = NULL; char *oaltfinal = NULL; int anysize = 0; @@ -776,7 +780,7 @@ string_assertion2keys_sub( } } if ( nsubs == 0 ) { /* no keys to return */ - return( 0 ); + goto done; } /* @@ -795,7 +799,6 @@ string_assertion2keys_sub( substring_comp_keys( ivals, &nsubs, altinit, initiallen, '^', syntax, comp_buf, substrlens ); } - slapi_ch_free_string(&oaltinit); for ( i = 0; altany != NULL && altany[i] != NULL; i++ ) { len = strlen( altany[i] ); if ( len < substrlens[INDEX_SUBSTRMIDDLE] ) { @@ -803,18 +806,22 @@ string_assertion2keys_sub( } substring_comp_keys( ivals, &nsubs, altany[i], len, 0, syntax, comp_buf, substrlens ); - slapi_ch_free_string(&oaltany[i]); } - slapi_ch_free((void **)&oaltany); - slapi_ch_free((void **)&altany); if ( altfinal != NULL ) { substring_comp_keys( ivals, &nsubs, altfinal, finallen, '$', syntax, comp_buf, substrlens ); } - slapi_ch_free_string(&oaltfinal); (*ivals)[nsubs] = NULL; - slapi_ch_free_string(&comp_buf); +done: + slapi_ch_free_string(&oaltinit); + slapi_ch_free_string(&oaltfinal); + for ( i = 0; altany != NULL && altany[i] != NULL; i++ ) { + slapi_ch_free_string(&oaltany[i]); + } + slapi_ch_free((void **)&oaltany); + slapi_ch_free((void **)&altany); + slapi_ch_free_string(&comp_buf); return( 0 ); } Comment on attachment 434784 [details] 0021-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12066&streamDefectId=12252&defectInstanceId=14137&fileInstanceId=49589 Comment on attachment 434771 [details] 0008-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12067&streamDefectId=12253&defectInstanceId=14138&fileInstanceId=49591 Comment on attachment 434772 [details] 0009-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12068&streamDefectId=12254&defectInstanceId=14139&fileInstanceId=48875 Comment on attachment 434772 [details] 0009-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12069&streamDefectId=12255&defectInstanceId=14140&fileInstanceId=48875 Comment on attachment 434785 [details] 0022-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12070&streamDefectId=12256&defectInstanceId=14141&fileInstanceId=49307 Comment on attachment 434773 [details] 0010-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12071&streamDefectId=12257&defectInstanceId=14142&fileInstanceId=49343 0010-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch Since it's a good chance, we could get rid of useless NULL checking for slapi_ch_.*alloc functions. Also, no need to take care any more, but since you touched the inside of #if defined (_WIN32), we could avoid the invalid free of priv->memory for Windows. diff --git a/ldap/servers/slapd/back-ldbm/perfctrs.c b/ldap/servers/slapd/back-ldbm/perfctrs.c index 5b7c68f..4f5361c 100644 --- a/ldap/servers/slapd/back-ldbm/perfctrs.c +++ b/ldap/servers/slapd/back-ldbm/perfctrs.c @@ -176,12 +176,12 @@ void perfctrs_init(struct ldbminfo *li, perfctrs_private **ret_priv) * On Windows, the performance counters reside in shared memory. */ if (NULL == instance_name) { - return; + goto error; } /* Invent the name for the shared memory region */ string = string_concatenate(instance_name,PERFCTRS_REGION_SUFFIX); if (NULL == string) { - return; + goto error; } #endif @@ -189,9 +189,6 @@ void perfctrs_init(struct ldbminfo *li, perfctrs_private **ret_priv) * We need the perfctrs_private area on all platforms. */ priv = (perfctrs_private *)slapi_ch_calloc(1,sizeof(perfctrs_private)); - if (NULL == priv) { - return; - } #if defined(_WIN32) /* Try to open the shared memory region */ @@ -200,7 +197,7 @@ void perfctrs_init(struct ldbminfo *li, perfctrs_private **ret_priv) /* Invent the name for the update mutex */ string = string_concatenate(instance_name,PERFCTRS_MUTEX_SUFFIX); if (NULL == string) { - return; + goto error; } open_event(string,priv); free(string); @@ -210,12 +207,17 @@ void perfctrs_init(struct ldbminfo *li, perfctrs_private **ret_priv) /* * On other platforms, the performance counters reside in regular memory. */ - if ( NULL == ( priv->memory = slapi_ch_calloc( 1, sizeof( performance_counters )))) { - return; - } + priv->memory = slapi_ch_calloc( 1, sizeof( performance_counters )); #endif *ret_priv = priv; + return; + +error: +#if !defined(_WIN32) + if (priv) slapi_ch_free((void**)&priv->memory); +#endif + slapi_ch_free((void**)&priv); } /* Terminate perf ctrs */ Comment on attachment 434774 [details] 0011-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12072&streamDefectId=12258&defectInstanceId=14143&fileInstanceId=49315 Comment on attachment 434775 [details] 0012-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12073&streamDefectId=12259&defectInstanceId=14144&fileInstanceId=49121 Comment on attachment 434775 [details] 0012-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12074&streamDefectId=12260&defectInstanceId=14145&fileInstanceId=49121 Comment on attachment 434776 [details] 0013-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12075&streamDefectId=12261&defectInstanceId=14146&fileInstanceId=49314 0013-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch About this diff: https://bugzilla.redhat.com/attachment.cgi?id=434776&action=diff#a/ldap/servers/slapd/back-ldbm/import-merge.c_sec1 We could just remove the useless NULL checking diff --git a/ldap/servers/slapd/back-ldbm/import-merge.c b/ldap/servers/slapd/back-ldbm/import-merge.c index 477320d..c99ac19 100644 --- a/ldap/servers/slapd/back-ldbm/import-merge.c +++ b/ldap/servers/slapd/back-ldbm/import-merge.c @@ -128,17 +128,11 @@ static import_merge_queue_entry *import_merge_make_new_queue_entry(import_merge_ /* Make a new entry */ import_merge_queue_entry *new_entry = (import_merge_queue_entry *)slapi_ch_calloc(1, sizeof(import_merge_queue_entry)); - if (NULL == new_entry) { - return NULL; - } new_entry->key = *key; new_entry->thang = *thang; new_entry->file_referenced_list = (int *)slapi_ch_calloc(passes, sizeof(fileno)); - if (NULL == new_entry->file_referenced_list) { - return NULL; - } (new_entry->file_referenced_list)[fileno] = 1; return new_entry; } Comment on attachment 434776 [details] 0013-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12076&streamDefectId=12262&defectInstanceId=14147&fileInstanceId=49314 0013-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch The proposed fix could make coverity happy, but it still leaves leaks: not just memory, but also possible DB handle and DB cursor leaks. But cleaning them up is not too important. If import fails, the DB is corrupted and we have to recover it anyway. If the import is running as an online-mode, the server should be shutdown and the DB must be recovered (by retrying offline import). @@ -643,6 +638,12 @@ static int import_merge_one_file(ImportWorkerInfo *worker, } error: + if (ret) { + import_log_notice(worker->job, "%s: Import merge failed. " + "If this is an online-import, shutdown the server " + "and try the offline command line import (ldif2db)" + inst_name); + } return ret; } Comment on attachment 434777 [details] 0014-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12077&streamDefectId=12263&defectInstanceId=14148&fileInstanceId=49306 Comment on attachment 434778 [details] 0015-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12078&streamDefectId=12264&defectInstanceId=14149&fileInstanceId=49316 Comment on attachment 434779 [details] 0016-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12079&streamDefectId=12265&defectInstanceId=14150&fileInstanceId=49318 Comment on attachment 434774 [details] 0011-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12088&streamDefectId=12274&defectInstanceId=14159&fileInstanceId=49315 Comment on attachment 434774 [details] 0011-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12089&streamDefectId=12275&defectInstanceId=14160&fileInstanceId=49315 0011-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch slapi_ch_free(_string) takes NULL input. We don't need the NULL checking. 1274 if (data.data) slapi_ch_free(&(data.data)); 1309 if (ecopy) slapi_ch_free_string((void**)&ecopy); 1717 done: 1718 if (ecopy) slapi_ch_free_string((void**)&ecopy); 1719 if (data.data) slapi_ch_free(&(data.data)); ==> 1274 slapi_ch_free(&(data.data)); 1309 slapi_ch_free_string((void**)&ecopy); 1717 done: 1718 slapi_ch_free_string((void**)&ecopy); 1719 slapi_ch_free(&(data.data)); Comment on attachment 434780 [details] 0017-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12083&streamDefectId=12269&defectInstanceId=14154&fileInstanceId=49058 Comment on attachment 434781 [details]
0018-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
The change made to the line 573 is not needed; the macro IDL_NIDS does the check.
572 LDAPDebug( LDAP_DEBUG_TRACE, "<= range_candidates %lu\n",
573 idl ? (u_long)IDL_NIDS(idl) : 0, 0, 0 );
#define IDL_NIDS(idl) (idl ? (idl)->b_nids : (NIDS)0)
Comment on attachment 434782 [details] 0019-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12086&streamDefectId=12272&defectInstanceId=14157&fileInstanceId=49351 Comment on attachment 434782 [details] 0019-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12091&streamDefectId=12277&defectInstanceId=14163&fileInstanceId=49351 Comment on attachment 434782 [details] 0019-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12092&streamDefectId=12278&defectInstanceId=14164&fileInstanceId=49351 Comment on attachment 434783 [details] 0020-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12090&streamDefectId=12276&defectInstanceId=14162&fileInstanceId=48986 valuearray_free takes NULL input. 528 if (valuestoadd) valuearray_free(&valuestoadd); ==> 528 valuearray_free(&valuestoadd); Comment on attachment 434778 [details] 0015-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12087&streamDefectId=12273&defectInstanceId=14158&fileInstanceId=49316 Created attachment 439478 [details]
0002a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
The patch has been modified to initialize prp right after creation.
Created attachment 439479 [details]
0004a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
The patch has been modified to initialize prp right after creation.
Created attachment 439480 [details]
0007a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
The patch has been modified to release all other allocated memories in string_assertion2keys_sub().
Created attachment 439482 [details]
0010a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
The patch has been modified to remove unnecessary NULL checking and fix invalid free for Windows.
Created attachment 439484 [details]
0011a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
The patch has been modified to remove unnecessary NULL checking.
Created attachment 439485 [details]
0013a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
The patch has been modified to remove unnecessary NULL checking and log a message when an error occurs.
Created attachment 439488 [details]
0018a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
The patch has been modified to remove unnecessary NULL checking.
Created attachment 439490 [details]
0020a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
The patch has been modified to remove unnecessary NULL checking.
Created attachment 439814 [details]
0023-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Comment on attachment 439478 [details] 0002a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030&mergedDefectIds=11991#mergedDefectId=12053&streamDefectId=12239&defectInstanceId=14124&fileInstanceId=49541 Comment on attachment 439479 [details] 0004a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030&mergedDefectIds=11991#mergedDefectId=12055&streamDefectId=12241&defectInstanceId=14126&fileInstanceId=49546 Comment on attachment 439480 [details] 0007a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030&mergedDefectIds=11991#mergedDefectId=12064&streamDefectId=12250&defectInstanceId=14135&fileInstanceId=49577 Created attachment 439819 [details]
0024-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch
Comment on attachment 439484 [details] 0011a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030&mergedDefectIds=11991#mergedDefectId=12072&streamDefectId=12258&defectInstanceId=14143&fileInstanceId=49315 Comment on attachment 439485 [details] 0013a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030&mergedDefectIds=11991#mergedDefectId=12075&streamDefectId=12261&defectInstanceId=14146&fileInstanceId=49314 Comment on attachment 439488 [details] 0018a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030&mergedDefectIds=11991#mergedDefectId=12084&streamDefectId=12270&defectInstanceId=14155&fileInstanceId=49303 Comment on attachment 439490 [details] 0020a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12090&streamDefectId=12276&defectInstanceId=14162&fileInstanceId=48986 Comment on attachment 439482 [details] 0010a-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030#mergedDefectId=12071&streamDefectId=12257&defectInstanceId=14142&fileInstanceId=49343 Comment on attachment 439814 [details] 0023-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030&mergedDefectIds=11991#mergedDefectId=12080&streamDefectId=12266&defectInstanceId=14151&fileInstanceId=49329 Comment on attachment 439819 [details] 0024-Bug-617630-fix-coverify-Defect-Type-Resource-leaks-i.patch http://10.16.47.145:8080/sourcebrowser.htm?projectId=10030&mergedDefectIds=11991#mergedDefectId=12093&streamDefectId=12279&defectInstanceId=14166&fileInstanceId=49336 On behalf of Endi (edewata), pushed to master. $ git merge endi Updating 92ee0f5..634c7aa Fast-forward Makefile.am | 4 +- Makefile.in | 4421 ++-- aclocal.m4 | 6884 +---- compile | 21 +- config.guess | 302 +- config.h.in | 12 +- config.sub | 232 +- configure |39022 ++++++++------------ depcomp | 172 +- install-sh | 517 +- .../plugins/replication/windows_connection.c | 27 +- .../plugins/replication/windows_inc_protocol.c | 18 +- ldap/servers/plugins/replication/windows_private.c | 1 + .../plugins/replication/windows_tot_protocol.c | 23 +- ldap/servers/plugins/rever/des.c | 72 +- ldap/servers/plugins/rever/rever.c | 8 +- ldap/servers/plugins/shared/utils.c | 508 - ldap/servers/plugins/syntaxes/string.c | 25 +- .../plugins/{shared => uiduniq}/plugin-utils.h | 16 - ldap/servers/plugins/uiduniq/utils.c | 254 + ldap/servers/plugins/usn/usn.c | 1 + ldap/servers/plugins/usn/usn_cleanup.c | 1 + ldap/servers/slapd/back-ldbm/filterindex.c | 10 +- ldap/servers/slapd/back-ldbm/id2entry.c | 16 +- ldap/servers/slapd/back-ldbm/idl.c | 15 +- ldap/servers/slapd/back-ldbm/import-merge.c | 28 +- ldap/servers/slapd/back-ldbm/import-threads.c | 21 +- ldap/servers/slapd/back-ldbm/index.c | 17 +- ldap/servers/slapd/back-ldbm/instance.c | 31 +- ldap/servers/slapd/back-ldbm/ldbm_index_config.c | 8 +- ldap/servers/slapd/back-ldbm/ldif2ldbm.c | 4 +- ldap/servers/slapd/back-ldbm/perfctrs.c | 24 +- ldap/servers/slapd/back-ldbm/vlv.c | 47 +- ldap/servers/slapd/entrywsi.c | 4 +- ldap/servers/slapd/plugin.c | 7 +- ldap/servers/slapd/util.c | 10 +- lib/ldaputil/certmap.c | 30 +- ltmain.sh |13199 ++++--- missing | 104 +- 39 files changed, 27784 insertions(+), 38332 deletions(-) delete mode 100644 ldap/servers/plugins/shared/utils.c rename ldap/servers/plugins/{shared => uiduniq}/plugin-utils.h (86%) create mode 100644 ldap/servers/plugins/uiduniq/utils.c mode change 100644 => 100755 ltmain.sh $ git push Counting objects: 232, done. Delta compression using up to 4 threads. Compressing objects: 100% (180/180), done. Writing objects: 100% (183/183), 204.48 KiB, done. Total 183 (delta 147), reused 7 (delta 3) To ssh://git.fedorahosted.org/git/389/ds.git 92ee0f5..634c7aa master -> master Undo the commit e23c8bd9994d5592738cb44e1c2b426aba7fbd4a $ git merge work Updating d6f0a9e..50aff56 Fast-forward ldap/servers/slapd/entrywsi.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) $ git push Counting objects: 11, done. Delta compression using up to 4 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 737 bytes, done. Total 6 (delta 4), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git d6f0a9e..50aff56 master -> master Bug description: CID 12090 was a false positive description: Undo the commit e23c8bd9994d5592738cb44e1c2b426aba7fbd4a |