diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c
index bc5b7b6e57a9809d48a4e63f04cca905de998f2d..2d32f3cc24670c68f4a1d1cd170b1cd227ef2808 100644
--- a/servers/slapd/overlays/accesslog.c
+++ b/servers/slapd/overlays/accesslog.c
@@ -1795,7 +1795,7 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
 	}
 
 	if ( e_uuid || !BER_BVISNULL( &uuid ) ) {
-		struct berval *pbv;
+		struct berval *pbv = NULL;
 
 		if ( !BER_BVISNULL( &uuid ) ) {
 			pbv = &uuid;