From: Alan T. DeKok Date: Fri, 3 Mar 2017 14:32:49 +0000 (-0500) Subject: fr_log_fp ,ay be NULL. Closes #1926 X-Git-Tag: release_3_0_13~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4344432e9101a1095509cccbb42d19d1bc312663;p=thirdparty%2Ffreeradius-server.git fr_log_fp ,ay be NULL. Closes #1926 --- diff --git a/src/main/radclient.c b/src/main/radclient.c index 7594ed4926e..80ae279968d 100644 --- a/src/main/radclient.c +++ b/src/main/radclient.c @@ -977,8 +977,10 @@ static int send_one_packet(rc_request_t *request) return -1; } - fr_packet_header_print(fr_log_fp, request->packet, false); - if (fr_debug_lvl > 0) vp_printlist(fr_log_fp, request->packet->vps); + if (fr_log_fp) { + fr_packet_header_print(fr_log_fp, request->packet, false); + if (fr_debug_lvl > 0) vp_printlist(fr_log_fp, request->packet->vps); + } return 0; } @@ -1087,8 +1089,10 @@ static int recv_one_packet(int wait_time) goto packet_done; } - fr_packet_header_print(fr_log_fp, request->reply, true); - if (fr_debug_lvl > 0) vp_printlist(fr_log_fp, request->reply->vps); + if (fr_log_fp) { + fr_packet_header_print(fr_log_fp, request->reply, true); + if (fr_debug_lvl > 0) vp_printlist(fr_log_fp, request->reply->vps); + } /* * Increment counters...