1
0
mirror of https://github.com/preble/libpinproc synced 2026-02-24 18:25:23 +01:00

pinprocfw: call PRDelete() even if file doesn't parse

Previously we'd fail to call PRDelete(), which may have been causing
some of my problems with attempting to re-connect to the P-ROC.
I assume PRDelete() closes out the connection in some way.
This commit is contained in:
Tom Collins
2020-06-24 10:00:00 -07:00
parent 26600a3eaf
commit acd55d6d69

View File

@@ -2136,9 +2136,6 @@ int processFile()
endClock = clock(); endClock = clock();
fclose( in ); fclose( in );
// Destroy the P-ROC device handle:
PRDelete(proc);
proc = kPRHandleInvalid;
return iErrorCode; return iErrorCode;
} }
@@ -2306,7 +2303,10 @@ int main( int argc, char** argv )
break; break;
default: default:
break; break;
} }
// Destroy the P-ROC device handle created by openPROC()
PRDelete(proc);
proc = kPRHandleInvalid;
} }
} }
} }