- Timestamp:
- May 29, 2015, 10:42:18 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/samhain.c
r454 r473 156 156 ptr->g_glob = calloc(1, SH_MAX_GLOBS * (GLOB_LEN+1)); 157 157 if (!(ptr->g_glob)) 158 return -1; 158 { 159 free(ptr); 160 return -1; 161 } 159 162 return pthread_setspecific(g_key, ptr); 160 163 } -
trunk/src/sh_calls.c
r472 r473 200 200 error = errno; 201 201 if (val_retry != 0) { 202 long eport ;202 long eport = 0; 203 203 char eaddr[SH_IP_BUF]; 204 204 char emesg[SH_BUFSIZE]; -
trunk/src/sh_entropy.c
r460 r473 640 640 } 641 641 642 /* cppcheck-suppress leakNoVarFunctionCall */ 642 643 if (NULL != freopen (_("/dev/null"), "r+", stderr)) 643 644 { -
trunk/src/sh_html.c
r454 r473 311 311 if (entry_orig != NULL) 312 312 { 313 entry_orig= realloc(entry_orig, /* free() ok */313 char * ptr = realloc(entry_orig, /* free() ok */ 314 314 entry_size + line_size + 1); 315 if (entry_orig) { add_size = line_size; } 315 if (ptr) { 316 entry_orig = ptr; 317 add_size = line_size; 318 } else { 319 { free(entry_orig); entry_orig = NULL; } 320 } 316 321 } 317 322 else -
trunk/src/sh_portcheck.c
r468 r473 1688 1688 char * interface, int type) 1689 1689 { 1690 char buf[256] ;1690 char buf[256] = { '\0' }; 1691 1691 int proto; 1692 1692 char * p; -
trunk/src/sh_srp.c
r454 r473 114 114 size = strlen(str) + 1; 115 115 if (size > siz_str_internal) 116 get_str_internal = realloc (get_str_internal, size); 116 { 117 char * ptr = realloc (get_str_internal, size); 118 if (ptr) 119 get_str_internal = ptr; 120 else 121 { free(get_str_internal); get_str_internal = NULL; } 122 } 117 123 if (get_str_internal == NULL) 118 124 { -
trunk/src/sh_static.c
r454 r473 1641 1641 ; /* 'label at end of compound statement' */ 1642 1642 SH_MUTEX_UNLOCK(resolv_lock); 1643 /* cppcheck-suppress resourceLeak */ 1643 1644 return 0; 1644 1645 } -
trunk/src/sh_unix.c
r462 r473 1504 1504 if (env1[envlen] == NULL) 1505 1505 { 1506 int i; 1506 1507 fprintf(stderr, _("%s: %d: Out of memory\n"), FIL__, __LINE__); 1508 for (i = 0; i < envlen; ++i) free(env1[len]); 1509 free(env1); 1507 1510 SL_RET0(_("sh_unix_copyenv")); 1508 1511 } … … 5672 5675 5673 5676 sigtrap_variables->not_traced = signum; 5677 /* cppcheck-suppress memleak */ 5674 5678 return; 5675 5679 } -
trunk/src/sh_utils.c
r454 r473 1315 1315 while (0 < (ii = sl_read (fp, &image[s], 4096))) 1316 1316 { 1317 unsigned char * ptr; 1317 1318 ilen += ii; 1318 1319 s += 4096; 1319 image = realloc (image, (size_t) (4096 + s)); 1320 ptr = realloc (image, (size_t) (4096 + s)); 1321 if (ptr) 1322 image = ptr; 1323 else 1324 { free(image); image = NULL; } 1320 1325 if (!image) 1321 1326 goto bail_mem; -
trunk/src/slib.c
r454 r473 1738 1738 /* Make entry. 1739 1739 */ 1740 /* cppcheck-suppress arrayIndexOutOfBoundsCond */ 1740 1741 if (fd >= MAXFD || fd < 0) 1741 1742 { … … 2010 2011 /* Make entry. 2011 2012 */ 2013 /* cppcheck-suppress arrayIndexOutOfBoundsCond */ 2012 2014 if (fd >= MAXFD) 2013 2015 {
Note:
See TracChangeset
for help on using the changeset viewer.