Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53953ec

Browse files
authored
fix null lock (microsoft#31)
1 parent8821b2c commit53953ec

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎apache2/apache2_util.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,15 +293,17 @@ static int write_file_with_lock(apr_global_mutex_t* lock, apr_file_t* fd, char*
293293
intrc;
294294
apr_size_tnbytes,nbytes_written;
295295

296+
if (lock==NULL||fd==NULL||str==NULL) {
297+
returnWAF_LOG_UTIL_FAILED;
298+
}
299+
296300
rc=apr_global_mutex_lock(lock);
297301
if (rc!=APR_SUCCESS) {
298302
returnWAF_LOG_UTIL_FAILED;
299303
}
300304

301-
if (fd!=NULL) {
302-
nbytes=strlen(str);
303-
apr_file_write_full(fd,str,nbytes,&nbytes_written);
304-
}
305+
nbytes=strlen(str);
306+
apr_file_write_full(fd,str,nbytes,&nbytes_written);
305307

306308
rc=apr_global_mutex_unlock(lock);
307309
if (rc!=APR_SUCCESS) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp